Reputation: 20545
I have the following input field:
<input id="name" name="real_name" type="text" placeholder="ie. Your full name or company name" class="form-control input-lg parsley-validated"
data-required="true" parsley-error-message="Please insert your name" >
However, when I press my submit button, I only get the standard This value is required.
message.
Can anyone tell me why?
Upvotes: 19
Views: 40313
Reputation: 1078
Try this attribute instead of parsley-error-message
:
data-parsley-required-message="Please insert your name"
It's not a custom error message for custom validator. You need to override the default 'required' error message with your one.
Upvotes: 27
Reputation: 132
For required field validation :
data-parsley-required-message="Please enter name"
For input pattern validation :
data-parsley-pattern-message="Please enter valid name"
In short change third word with your validation type.
Upvotes: 1