Changes

JavaScript Validation

61 bytes added, 21:05, 3 January 2013
no edit summary
==To accept only certain values==
>''n '' or @value@>''n''
If @value@ is not found, the system will automatically put it at the very front of the validation criteria.
'''Where'''
''n '' is any number
> means greater than
==To limit the amount of characters that can be entered into a field==
@value@.length<''n''
'''Where'''
''n '' is any number
'''Example'''
==To have a custom field only accept values in a range==
@value@>''n '' && @value@<''n''
'''Where'''
''n '' is any number
&& means "AND"
==To perform pattern matching==
isMatch(@value@, ''pattern'', ''isEmptyOK'')
Where ''pattern '' is
L = Letter
'''AND'''
''isEmptyOK '' is
True or False
==To allow only numbers and one other character==
isFloat(@value@.replace(/''c''/g,""),true)
'''where'''
==To allow letters and a space==
isAlphabetic(@value@,''Allow Empty'',''Allow Space'')
'''where'''
8,849
edits