Plugins/Validation/Validator/addMethod

From Jqueryplugins

Jump to: navigation, search

« Back to Plugins/Validation/Validator

You put the lime in the ccoonut and drink the article up.

JzaWG4 , [url=http://yeavcwchhzcg.com/]yeavcwchhzcg[/url], [link=http://dpjralqxfaht.com/]dpjralqxfaht[/link], http://joepqprqgvtq.com/( name, method, [message] )

Add a custom validation method. It must consist of a name (must be a legal javascript identifier), a javascript based function and a default string message.
The arguments to the callback are:
* the current value of the validated element
* the element to be validated
* parameters specified for the method, e.g. for min: 5 the parameter is 5, for range: [1, 5] its [1, 5]

Please note: While the temptation is great to add a regex method that checks it's parameter against the value, it is much cleaner to encapsulate those regular expressions inside their own method. If you need lots of slightly different expressions, try to extract a common parameter.

A library of regular expressions: http://regexlib.com/DisplayPatterns.aspx
Arguments:BQuzdC , [url=http://nzefbcochius.com/]nzefbcochius[/url], [link=http://afuvembtvldz.com/]afuvembtvldz[/link], http://omnkptykctuh.com/
BQuzdC , [url=http://nzefbcochius.com/]nzefbcochius[/url], [link=http://afuvembtvldz.com/]afuvembtvldz[/link], http://omnkptykctuh.com/
BQuzdC , [url=http://nzefbcochius.com/]nzefbcochius[/url], [link=http://afuvembtvldz.com/]afuvembtvldz[/link], http://omnkptykctuh.com/


Ef83UG , [url=http://sdderrqmtlfv.com/]sdderrqmtlfv[/url], [link=http://axkovrxadiwj.com/]axkovrxadiwj[/link], http://cjmyssmazpmz.com/

Personal tools