diff --git a/Guide.md b/Guide.md index ec58236..04161d8 100644 --- a/Guide.md +++ b/Guide.md @@ -204,6 +204,7 @@ AccountsTemplates.configure({ showResendVerificationEmailLink: false, // Client-side Validation + signInPreValidation: false, continuousValidation: false, negativeFeedback: false, negativeValidation: true, @@ -268,6 +269,7 @@ Details for each of them follow. | **Texts** | | | | | texts | Object | | Permits to specify texts to be shown on the atForm for each of its states (see [below](#configuring-texts)). | | **Client-side Validation** | | | | +| signInPreValidation | Boolean | false | Specifies whether to pre validation in client side when state is `signIn`.| | continuousValidation | Boolean | false | Specifies whether to continuously validate fields' value while the user is typing. *It is performed client-side only to save round trips with the server*. | | negativeValidation | Boolean | false | Specifies whether to highlight input elements in case of negative validation. | | positiveValidation | Boolean | false | Specifies whether to highlight input elements in case of positive validation. | diff --git a/lib/templates_helpers/at_pwd_form.js b/lib/templates_helpers/at_pwd_form.js index 2f8d53c..629b3a2 100644 --- a/lib/templates_helpers/at_pwd_form.js +++ b/lib/templates_helpers/at_pwd_form.js @@ -36,7 +36,7 @@ AT.prototype.atPwdFormEvents = { var parentData = Template.currentData(); var state = (parentData && parentData.state) || AccountsTemplates.getState(); - var preValidation = (state !== "signIn"); + var preValidation = AccountsTemplates.options.signInPreValidation || (state !== "signIn"); // Client-side pre-validation // Validates fields values