Murray Macchio![]()
This non-instrusive component will change your regular forms into highly interactive forms. Fields filled in incorrectly will be highlighted as incorrect, while inputs filled in properly will be shown as correct. Fully customizable, use your own CSS to mark fields as valid or invalid.
Main features include
See full documentation here
http://murdog05.github.com/yui3-gallery/docs/module_validator.html
UPDATE: Added feature to allow for instructions to pop up as user types.
Below is for a simple html page in which you want the form validator to do all the work. It will create all the validators. See here for example
http://murdog05.github.com/yui3-gallery/examples/json/dynamicValidatorsExample.html
See the inline equivalent here
http://murdog05.github.com/yui3-gallery/examples/inline/dynamicValidatorsExample.html
<script src="http://yui.yahooapis.com/3.1.1/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.06.09-20-45'
}).use('gallery-formvalidator', function(Y) {
var form2 = new Y.Validator(
{
form:'basicExample2',
defaultIndicatorDomType:'DIV',
defaultIncorrectIndicatorCss:'validator',
defaultCorrectIndicatorCss:'indicator',
createCorrectIndicator:true,
createIncorrectIndicator:true,
correctIndicatorText:'<span class="indicator"> </span>',
incorrectIndicatorText:'<span class="validator"> </span>',
fieldJSON:[
{
type:Y.TextBaseField,
atts:{
inputDOM:'firstName2'
}
},
{
type:Y.TextBaseField,
atts:{inputDOM:'lastName2'}
},
{
type:Y.DoubleField,
atts:{
inputDOM:'income2',
max:40000.00,
maxDecimalPlaces:2
}
},
{
type:Y.IntegerField,
atts:{
inputDOM:'age2',
max:100,
min:10
}
}
]
}
);
});| Subject | Author | Date |
|---|---|---|
| Any comments suggestions or feedback | Murray Macchio | 11/25/09 |
| Re: Any comments suggestions or feedback | Murray Macchio | 11/25/09 |
| Re: Any comments suggestions or feedback | Eric Miraglia | 11/25/09 |
| Re: Any comments suggestions or feedback | logemann | 04/2/10 |
| Re: Any comments suggestions or feedback | Murray Macchio | 04/3/10 |
| Re: Any comments suggestions or feedback | John Lindal | 05/27/10 |
| Re: Any comments suggestions or feedback | Murray Macchio | 05/27/10 |
| Y.DOM.insertAfter() | Brian DeRocher | 06/6/10 |
| Re: Y.DOM.insertAfter() | Murray Macchio | 06/7/10 |
| Dynamic forms & form validator | James Brisland | 02/1/11 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info