Comments (4)
Hello,
Can you give me the URL of the page you're testing? I may be able to help you.
from jqbootstrapvalidation.
@tongyi121 I'm afraid this is deliberate. Because validation needs to be instant, and your callback might take a while to respond (say you might be doing your own AJAX and the server goes down), the validator assumes the field is valid until it knows otherwise. When it gets a response, it re-runs the validation, but by then it might be too late.
Because you're setting the default value (in the HTML?), no events are triggered. This means the first time the validator checks the value is when 'submit' is clicked.
I'd suggest using the placeholder
attribute for the default value, and making the field required
.
Apologies for the badly worded documentation, I'm in the process of re-writing it.
from jqbootstrapvalidation.
If the above doesn't help, feel free to re-open and add more information. Thanks
from jqbootstrapvalidation.
Hi. I'm having a similar issue using the callback (I'm using it to validate the date field). I am using placeholder and have made the field required- and the validation is correct when no input is given. If I type in an incorrect date, the callback is called and the error message shows. However, if I simply 'submit' the form at that point, the form submits with the bad date info. Am I using callback correctly? Is there any significance to the fact that the error message/label is "amber" after failing invalidation and not "red"? After I submit the message/label becomes "red".
from jqbootstrapvalidation.
Related Issues (20)
- Destroy undoes validations
- I use jquery ui to change the selectmenu,how can i to validate the selectmenu?
- Pattern
- Warning Don't Show
- jqBootstrapvalidation callback validation function not working after form validation
- filter does not affect "required" item
- Deprecated dependency "jQuery" in package.json
- jsBootstrapValidation it's not working with Bootstrap-select HOT 1
- The email [email protected] is correct? HOT 1
- Not working properly with jQuery > 1.7.2 HOT 2
- Remove wrong Comments
- Please add to JSDelivr HOT 1
- Not required Select menu tag have a red borde HOT 1
- How can you dynamically trigger validation of a single field? HOT 2
- Regex not working, input is never seen as valid
- i have two issues with the jqBootstrapValidation
- Validation field depending respect another 2 fields
- An email address with a TLD longer than four letters (like ".today") is marked invalid
- Dynamic Validate Problem
- How to make it work in modal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jqbootstrapvalidation.