bmauser / bvalidator Goto Github PK
View Code? Open in Web Editor NEWbValidator is a form validation jQuery plug-in.
Home Page: http://bmauser.github.io/bvalidator/
License: MIT License
bValidator is a form validation jQuery plug-in.
Home Page: http://bmauser.github.io/bvalidator/
License: MIT License
If the input tag have the the type="text" it's ok.
But if the input tag have the type="email", the error message appears twice like this:
Please enter a valid email address.
Please enter a valid email address.
The input element:
<input name="email" type="email" id="email" data-bvalidator="required,email" placeholder="E-mail">
Hi bmauser, I'm trying to validate phone number I don't want user to enter 9999999999 so I'm using regex[!(9999999999)] . But its not working. I also tried regex[^(9999999999)] but its not working. Please help me out with this. I cant attach custom function to validate as form data comes in dynamically to the angularJS view.
I do have 2 instance of bvalidator on my form and 2 buttons. One saves the form when its partially validated the another saves the form when its completely validated. When its completely valitdated it works fine. But when I want to disable the first instance and run the second instance it doesnt work. It does destroy the whole bvalidation instance, instead of destroying only its first instance. More on SO:
http://stackoverflow.com/questions/38090941/how-to-enable-disable-the-2-instance-of-bvalidator
I really would be much appreciated if this can be fixed, or its me doing something wrong.
Title pretty much says it all. Hidden elements are skipped when bValidator is initialized on the form. Libraries like Chosen set the select to display none, meaning the element will not be validated.
I forked and updated the code to add a new option to bValidator here: https://github.com/ckihneman/bValidator
It is hidden away pretty well behind the new option, and could help some people out. Consider merging it in via #2 . Here is a thread of some people running into this same issue.
Hey,it would be really helpful if you make this available as a bower package
Hello,
Basically, I'm trying to implement one of the examples with ajax validation, but no matter what is the result it always does show the validaiton-ajax message, that its wrong.
I have a form which has data-bvalidator-option-ajax-url="getRecordId.action"
in the header of the form.
Than I have input <input id="recordId" name="recordId" type="text" value="$!citizen.recordId" data-bvalidator="digit,ajax,required" data-bvalidator-msg-ajax="The number does exist in the DB. ENter new number" data-fordraft="digit,required" data-bvalidator-modifier="myDigitsModifier"/>
When I type any numbers, doesnt matter it does exist or no, it always shows a message that The number does exist in the DB.
I do return a simple JSON from the server:
if it does exist I return {"recordId":"false"}
which should mean that it does exist and it should not be validated.
if it DOES NOT exist I return {"recordId":"ok"}
, which should be validated as OK... but it still gives me an error message that number doest exist.
Any help is appreciated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.