jaymorrow / validatr Goto Github PK
View Code? Open in Web Editor NEWCross Browser HTML5 Form Validation.
Home Page: http://jaymorrow.github.com/validatr/
License: MIT License
Cross Browser HTML5 Form Validation.
Home Page: http://jaymorrow.github.com/validatr/
License: MIT License
Reproduce:
Result:
Validation message is positioned incorrectly.
If you have more than 1 form on a page, it is possible to collide with another form that uses the same names for inputs. e.g.
<form>
<input type="text" name="input1" required>
</form>
<form>
<input type="radio" name="input1" value="single">
<input type="radio" name="input1" value="double">
</form>
The following would result in a non submitted second form on submit, due to the first form's input's required attribute.
In line 133, data-format and defaultOptions are used, but not options specified while initializing.
In Chrome Version 25.0.1364.97 the date validation is not passing when a date is entered as mm/dd/yyyy and only passes for yyyy-mm-dd. Is there anyway this can be fixed?
Thanks for your consideration!
I am using Javascript Custom Forms which replaces some elements with fake ones. In the case of select elements it moves them 9999 px to the left.
I would usually do something along the lines of:
function positionForSelect(event){
var e = window.event || event;
var t = e.target || e.srcElement;
if (t.nodeName.match(/select/i)) {
// move errormessage 9999px to the right
} else {
// normal behavior
}
}
*edit: I want to position the error validation message next to the fake select
Can you help me out on this one?
I have sometimes a javascript error : $target.on is undefined
It seems there is a mistake in version 0.5.0 : line 559,
$target = target;
It should be
$target = $(target);
object elements should be excluded from element list (line 453)
At least invalid 2 patterns is possible to submit:
[x] Bug (Typo)
seperated
.separated
.How can I know total invalid elements?
If form have one or more invalid element I wont to add message on top form.
Thanks.
Hi!
I'm implementing validatr and for some reason Google Chrome is accepting only US dates, breaking the validation for dd/mm/yyyy standard.
Thank you in advance for any help you can provide.
I would like to integrate this into my company's framework but the inline styles for the error messaging means that I will have to modify the plugin source in order to remove that. I know there are a few options for placement and theme but I cannot see one where all styles are removed.
Could you give the option to remove all inline styles? Can these be set by default? Could you also add an option for a custom class name for the errors?
Create the bower.json file and submit to the registry. See http://bower.io/
my quick fix is:
function validateForm(elements) {
var valid = true;
elements.each(function (i, element) {
if (element.type !== 'fieldset') {
if (!validateElement(element)) {
valid = false;
}
}
});
return valid;
}
It seems to be validating email addresses without a TLD. e.g. "abc@abc" validates.
UPDATE:
Upon further research there are use cases for email addresses without a top level domain.
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.