phatfusion
javascript and flash development.
validate
version 2.1
form validation.
example
features
- optional onFail function.
- optional onSuccess function which will overide the form submition, this can be used to validate an ajax form.
- onBlur validating
- shows errors next to item or in a list.
usage
var myFormValidation = new Validate('myForm',{
errorClass: 'red'
});
options
- validateOnBlur
- item is automatically validated on the onBlur event. Default: true
- errorClass
- the css class for the item. Default: 'error'
- errorMsgClass
- the css class of the inline error message. Default: 'errorMessage'
- showErrorsInline
- this shows the error messages after the item, inline. This needs to be on for validateOnBlur. Default: true
- dateFormat
- the format of any date entered. Default: 'dd/MM/yy'
- label
- the label on the submit button when the form is submitted. Default: 'Please wait...'
- onFail
- a function that is called when the validation fails. A list object containing the errors is passed to this function. The form is not submitted.
- onSuccess
- a function that is called when the validation is successful. The form object is passed to this function. The form is not submitted.
browser compatibility
- Firefox 2 (mac / pc)
- IE 7
- IE 6
- Safari (mac)
requirements
downloads