yav - javascript validation tool
Home
Download
|
Support
Documentazione
Come iniziare
Regole di validazione
Supporto multi-lingue
Impara per esempi
Form di registrazione
Notifica cambiamenti
Iscrizione newsletter
Captcha
Operatori and/or
Regole Pre/Post/Implies
Le maschere
Validazione custom
Supporto
Gruppo discussioni
Mailing list
Contatto e-mail
Example 7
Here you can learn more about the masks.
'alphabetic' is a mask embedded into Yav.
'mydate' is a mask added with the function
yav.addMask
.
If Yav doesn't find the named mask it uses the characters in the name as the ones accepted (e.g. '
.01
').
source
var rules=new Array(); rules[0]='alphabetic|required'; rules[1]='date|required'; rules[2]='date|date'; rules[3]='alphabetic|mask|alphabetic'; rules[4]='date|mask|mydate'; rules[5]='custom|mask|01.'; yav.addHelp('alphabetic', 'This field only accepts alphabetic characters'); yav.addHelp('date', 'This field only accepts dates with mask dd-dd-dddd'); yav.addHelp('custom', 'This field only accepts the characters: .01'); yav.addMask('mydate', ' - - ', '1234567890');
Working with the masks
Alphabetic:
Date:
Custom:
Copyright 2005-2008. All rights reserved.