Topic: Options on form validations on modal form
Jakub Strebeyko staff answered 7 years ago
.validate()
being one of the most widely used by our customers, it seems.
With Best Regards,
Kuba rna014 pro commented 7 years ago
Thanks. What would be the recommended method of displaying validation error messages on MDB forms ? - Are there any examples I can review ?Jakub Strebeyko staff commented 7 years ago
Well, usually passing in the messages for particular fields is done withdata-error
/ data-success
attributes. The method, though, may vary from plugin to plugin.
rna014 pro commented 7 years ago
ok I follow. I am trying out parsley as my validator and it exposes an attribute called "data-parsley-error-message" for the error message. What would a way of styling/positioning the output of this attribute the same way that MDB styles "data-error" ?Jakub Strebeyko staff commented 7 years ago
I don't know Parsley, so can't advice, but if I were to be guessing - would suggest enriching it's initialization function with a script dynamically injectingdata-parsley-error-message
to particular element's data-error
attribute. Worth to mention, that inputs' visual feedback is triggered using .validate
, .valid
and .invalid
classes - that would be the way to tie it in with your validation method of choice.
With Best Regards,
Kuba
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No