Open AlstonLin opened 8 years ago
Here's a problem with this approach - since it will throw an error, this will only allow a single field to be validated and update the UI. If there's multiple errors, then only the first one will be shown.
We should figure out a different way to approach this
More efficient for the server and better UX. Use the default MDL error UI to show errors. See SelectField for an example of this.
First, build a custom class called
FieldValidationError
.This should be how it works
FieldValidationError
when getting the valueFieldValidationError
and simply return if it caught, stopping any further action.