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

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!

  • Let me know if this is helpful or you need any help, Thanks :-) – Kishan Savaliya Jul 3 '20 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.