Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable' into UI_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Murali Suresh committed Jan 27, 2017
2 parents 162470f + 0fb5307 commit 9ff84a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reactJS/app/components/RegisterComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class RegisterComponent extends Component {
sortedDates[j] = formattedEnteredDates[intermediateSortedDates[j]];
}

this.props.dispatch(registerEvent(this.props.name, this.props.purpose, sortedDates, this.props.location));
this.props.dispatch(registerEvent(this.props.name.trim(), this.props.purpose.trim(), sortedDates, this.props.location));
}

validateRegisterEvent() {
Expand Down Expand Up @@ -199,9 +199,9 @@ class RegisterComponent extends Component {
stepIncrease() {
switch (this.props.stepIndex) {
case 0:
if (this.props.name.length === 0) {
if (this.props.name.length === 0 || this.props.name.trim() == '') {
this.props.dispatch(storeNameErrorLabel(this.props.languageJson.nameErrorLabelRequired));
} else if (this.props.purpose.length === 0) {
} else if (this.props.purpose.length === 0 || this.props.purpose.trim() == '') {
this.props.dispatch(storePurposeErrorLabel(this.props.languageJson.purposeErrorLabelRequired));
} else {
this.props.dispatch(stepIncrease(this.props.stepIndex));
Expand Down

0 comments on commit 9ff84a7

Please sign in to comment.