Closed rehandalal closed 5 years ago
"added precaution"? Doing a validation on the client, before XHR saving, is to potentially avoid bothering to send the XHR at all until the user fixes it. One worry I have is that the textarea is a controlled input which means that we would only be able to validate the final filter expression input onBlur. Also, if someone never on-blurs the textarea and hit the "Save" button right away, this validation will race against the onSubmit, right?
We should validate filter expressions using mozjexl as an added precaution before sending them to the server.