Validation in QML
-
Hello,
There is something not very clear in documentation.
Say, I am using
RegExpValidatorfor e-mail address form field.How to trigger validation of this field upon submission of the form?
Currently, with the correctly set
validatorproperty of theTextFieldQML type, I am able to leave the field with malformed e-mail address and there is no complaint shown in the user interface.What am I missing?
Thank you in advance.
-
When validator is set you can use
acceptableInputproperty of input, to check if it valid. -
When validator is set you can use
acceptableInputproperty of input, to check if it valid.@intruderexcluder said in Validation in QML:
When validator is set you can use
acceptableInputproperty of input, to check if it valid.Excellent!
I have now noticed how this relates to
accepted()signal andonAcceptedhandler.Thank you for the prompt reply.