Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Custom error message for required fields #222

Closed
liamwooding opened this issue Oct 14, 2015 · 3 comments
Closed

Custom error message for required fields #222

liamwooding opened this issue Oct 14, 2015 · 3 comments
Assignees

Comments

@liamwooding
Copy link

Hi, is there a way to define a custom error message for when a required field is empty? The default "Please fill out this field" is fine in Chrome & Firefox, but in Safari it just says "value missing", which I'd like to change to something more customer-friendly. Is there a way to do this without defining a custom validator?

@1000hz
Copy link
Owner

1000hz commented Oct 14, 2015

At the moment, your only option is to set data-native-error on your field to the message, but keep in mind that if you have other built-in validators (like type="email" or pattern) their error messages will be overtaken as well.

This is something I'll address in the next version with the approach in #218.

@1000hz 1000hz self-assigned this Oct 14, 2015
@liamwooding
Copy link
Author

Great to hear, thanks!

@rosesonfire
Copy link

Please do that !

@1000hz 1000hz closed this as completed in b1afa2f Jul 15, 2016
andrews05 pushed a commit to andrews05/bootstrap-validator that referenced this issue Mar 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants