jQuery-Form-Validator icon indicating copy to clipboard operation
jQuery-Form-Validator copied to clipboard

Ability to force validation of single hidden element

Open Igloczek opened this issue 9 years ago • 6 comments
trafficstars

I think it's useful to have ability to force validation of single hidden input - in my case for select elements generated by Select2.js lib.

How to use: Add data-force-validation-if-hidden="true" and global settings will be ignored.

Igloczek avatar Jun 07 '16 15:06 Igloczek

Any update when this merge will be is resolved and this feature added?

xdragus avatar Mar 13 '17 14:03 xdragus

Attribute force-validation-if-hidden must be prefixed validation-. Use $(...).valAttr('force-validation-if-hidden') instead of $(...).data('force-validation-if-hidden')

victorjonsson avatar Apr 04 '17 13:04 victorjonsson

Whare can I find the implementation of valAttr method? It's not in jQuery API docs and doesn't looks like a custom method too.

Igloczek avatar Apr 04 '17 21:04 Igloczek

https://github.com/victorjonsson/jQuery-Form-Validator/blob/master/src/main/jquery-plugins.js#L284

victorjonsson avatar Apr 04 '17 21:04 victorjonsson

Changed to valAttr .

Igloczek avatar May 14 '17 07:05 Igloczek

This PR is merged and adapted here: https://github.com/Amedeo91/jQuery-Form-Validator

Amedeo91 avatar Mar 29 '20 17:03 Amedeo91