0

If I am submitting registration form as blank then all fields are showing an error message:

This is required field

I want to change this message according to fields.

For Example:

> > First name is required
 
> > Last Name is required
 
> > Email is required
0

You can use data-msg-required attribute in all form fields and you can pass your custom message there.

For ex. for an input field you can use like this..

<input type="text" name="firstname" data-msg-required="Firstname is required." data-validate="{required:true}" />

Hope this will help you!

| improve this answer | |
  • Let me know if this is helpful or you need any help, Thanks :-) – Kishan Savaliya Jul 3 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.