Update validation order to match field order
Validation is meant to run in reverse order of the fields (so that the last message emitted is for the first invalid field).
This commit is contained in:
parent
8b66b6bdb3
commit
27abd7d507
1 changed files with 2 additions and 2 deletions
|
@ -82,11 +82,11 @@ module.exports = React.createClass({
|
||||||
// is the one from the first invalid field.
|
// is the one from the first invalid field.
|
||||||
// It's not super ideal that this just calls
|
// It's not super ideal that this just calls
|
||||||
// onError once for each invalid field.
|
// onError once for each invalid field.
|
||||||
|
this.validateField(FIELD_PHONE_NUMBER, ev.type);
|
||||||
|
this.validateField(FIELD_EMAIL, ev.type);
|
||||||
this.validateField(FIELD_PASSWORD_CONFIRM, ev.type);
|
this.validateField(FIELD_PASSWORD_CONFIRM, ev.type);
|
||||||
this.validateField(FIELD_PASSWORD, ev.type);
|
this.validateField(FIELD_PASSWORD, ev.type);
|
||||||
this.validateField(FIELD_USERNAME, ev.type);
|
this.validateField(FIELD_USERNAME, ev.type);
|
||||||
this.validateField(FIELD_PHONE_NUMBER, ev.type);
|
|
||||||
this.validateField(FIELD_EMAIL, ev.type);
|
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
if (this.allFieldsValid()) {
|
if (this.allFieldsValid()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue