From 67bbcba5e2aa20e87c10b3a2741f1707d27a40fe Mon Sep 17 00:00:00 2001 From: ahmadzuhdi Date: Thu, 31 Jan 2019 11:31:57 +0700 Subject: [PATCH] feat: add password validation --- src/common/pages/RegisterNew/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/pages/RegisterNew/index.js b/src/common/pages/RegisterNew/index.js index a9c1536..99aa30a 100644 --- a/src/common/pages/RegisterNew/index.js +++ b/src/common/pages/RegisterNew/index.js @@ -130,6 +130,11 @@ class RegisterPage extends React.Component { register = () => { + // return this.props.history.push(LINKS.LOGIN); + + if (this.state.password.length < 8) { + return message.warning("password need atleast 8 characters"); + } // if (this.state.upload_photo === '') { // return message.warning("please upload photo"); // } @@ -158,10 +163,7 @@ class RegisterPage extends React.Component { additional_data: {} }; this.authStore.register(data).then(res => { - // message.success("Please check your email to confirm your account"); - - - + //message.success("Please check your email to confirm your account");this.props.history.push(LINKS.LOGIN); setTimeout(() => { this.setState({ isLoading: false }); this.props.history.push(LINKS.REGISTER_COMPLETED);