jquery.validation - how to ignore default values when validating mandatory fields

前端 未结 8 1150
一向
一向 2020-12-03 00:00

I am using jquery validation plugin to validate a registration form.

Each text input field has instructions pre-filled as values in the input box

ex: for a

8条回答
  •  囚心锁ツ
    2020-12-03 00:37

    I made some patch to jquery.validationEngine to allow ignoring some input field for some complexe form. I made the following changes:

    • Add support for jquery.dropkick select skining validation position
    • Add select field invalid for ve_invalid value entry (to be able to display directive without it being a valid selection)
    • Add hideAllInstant to remove validation with no delay
    • Add support for jquery.simpleImageCheck element if original input is hidden, use location of simpleImageCheck instead
    • Add skipValidate class to avoid validation on some fields without disabling them
    • Fix error when no match with prompt_err undefined, destination was generating an error
    • add clearField support to avoid validating jquery.clearField.js
    • add validateHiddenFields, validation on hidden and non-hidden field

    In your case you can use the modification for the skipValidate class to perform this. You can find the patched script here along with the english filter (fr one is also available):

    jquery.validationEngine.js Patched

    jquery.validationEngine-en.js Patched

    I should submit those change into git hub, but did not got time to do so right now.

    Jerome Godbout

    Panthera Dental

提交回复
热议问题