Form validation exclamation mark position change?

Hi,

is it possible to change to position of the form validation exclamation mark to the front of the fields which are not filled?

thanks
martin

The easiest way to have the exclamation marks show up next to the invalid fields this is to add an own validator to each field in the form.
The problem here is that check for empty values in Fields currently ignore any other validators added to the field which results in the field never being able to display its own exclamation marks when in a Form. So currently I couldn’t figure out a way to get the “required but empty” exception to show up correctly, for any other sort of validations the solution should work.


Note :
If you are calling the commit method from say a “Submit” button to validate the form, but do not want the form to let you know that a field had an error (duplicate exclamation marks), then the easiest solution would probably be to change the functionality of the submit button to first call the
validate()
method, and then swallow any possible exception it might throw and only after it goes through without exceptions, you run the
commit()
method again.

What do you mean by changing its position? Where should it be?

The error indicator is a part of the client-internal widget VCaption and is therefore rendered by the layout together with the caption - it is not rendered by the field (exception: fields like Button and CheckBox that handle the caption internally). You
might
be able to tweak its position within the caption with some CSS, but placing it freely is not possible - then you would have to have your own mechanism for rendering it.

Note that the field has a “-error” style (e.g. “v-textfield-error”) so you could also use it to have your own way of indicating errors within the field.