Skip to content

Manually trigger input validation

Sunny Ripert edited this page Oct 5, 2015 · 12 revisions

Use the following "script":

$input = $('#validated_input')
$form = $input.closest('form')

$input.data('changed', true)
$input.isValid($form[0].ClientSideValidations.settings.validators)

It might not work for multiple inputs selected at once by $input.

Gem version 3.2.7