HOW TO add my own (additional) check for fields?

Discuss everything related to JavaScript Auto Form Validator. Questions and requests here.

Moderator: alexandrleonenko

Site Admin
Site Admin
Posts: 6026
Joined: Jan 7th, '09, 23:18

HOW TO add my own (additional) check for fields?

Postby administrator » Dec 7th, '10, 11:05

Sometimes you need to do more complicated check or add your own check for fields.
To do this simply add your own function in following format:


Code: Select all

<script type='text/javascript'>
    function MyCheck(){
        // place here your check .....
        return true; // or false

2. Add in onclick="return jsFormValidator.onSubmitCheck(.....)

onclick="return MyCheck() && jsFormValidator.onSubmitCheck(.....)
onclick="return jsFormValidator.onSubmitCheck(.....) && MyCheck()

depending on priority of your function.

P.S. Take in account that this feature also allows you to write your own check for dependent fields.

Return to “JS Auto Form Validator”