Reputation: 53
I want to trigger the parsley-error on an input text field only at the time of 'focus out' and not on change event.
These are the steps I perform to produce the issue:
I don't want the user to be bugged by the error appearing on the tooltip while he is making the changes. The error should be appeared only at the time of focus out but on this third step, the error is appearing at the time of 'change' as well.
I am not sure how can I tell Parsley to avoid some certain triggers! Any suggestion?
Please note that the issue is not faced on the first step. The issue is faced only at the 3rd step mentioned above. Here is my code:
<input type="text" class="form-control border-radius-6 onClickHideError"
id="passport_number" name="passport_number" required=""
maxlength="30"
placeholder=""
data-parsley-password-field="true"
data-parsley-trigger="focusout"
data-parsley-pattern="/^[a-zA-Z0-9]*$/"
data-parsley-required-message="${commonRequiredMsg}"
data-parsley-pattern-message="${passportInvalidMsg}"
autocomplete="off">
Upvotes: 0
Views: 253
Reputation: 79552
Parsley allows you to set data-parsley-trigger-after-failure
to your choosing.
Upvotes: 0