1000hz / bootstrap-validator

A user-friendly HTML5 form validation jQuery plugin for Bootstrap 3
http://1000hz.github.io/bootstrap-validator
MIT License
2.38k stars 1.07k forks source link

Get input value in error messages (Custom Validation) #654

Open localnetwork opened 5 years ago

localnetwork commented 5 years ago

I want to get the value of the input if the input value doesn't follow the format of the pattern.

Example:

localnetwork commented 5 years ago

<input type="email" name="email" class="form-control" value="{{ old('email') }}" placeholder="Email*" pattern="^[\w]{1,}[\w.+-]{0,}@[\w-]{2,}([.][a-zA-Z]{2,}|[.][\w-]{2,}[.][a-zA-Z]{2,})$" data-error-pattern="(input-value) is incomplete" required />