yav - javascript validation tool
Home
Download
|
Support
Documentation
Getting started
Validation rules
Multi-language support
Learn by example
Simple registration form
Notification of changes
Newsletter Sign-up
Captcha
The andor-operator
Pre/Post/Implies rules
Working with the masks
Custom validation
Support
Discussion group
Mailing list
E-mail contact
Example 3
This is a newsletter sign-up example.
Here you can learn more about the andor-operator.
Note that in some circumstances the error message is not linked to a particular field,
so Yav automatically uses the default position (i.e. the
errorsDiv
element).
source
var rules=new Array(); rules[0]='checkbox1|equal|ischecked|andor-operator'; rules[1]='checkbox2|equal|ischecked|andor-operator'; rules[2]='checkbox3|equal|ischecked|andor-operator'; rules[3]='checkbox4|equal|ischecked|andor-operator'; rules[4]='0|or|1-2-3|You must select one newsletter at least.'; rules[5]='email|required'; rules[6]='email|email'; yav.addHelp('email', 'Enter your e-mail');
Newsletter Sign-up
Sign up for our technology specific newsletters.
web applications
client/server applications
enterprise applications
network management
E-mail:
Copyright 2005-2008. All rights reserved.