feat: add password validation
This commit is contained in:
parent
e178fe8410
commit
67bbcba5e2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user