diff --git a/src/common/components/forms/user/RegisterForm.js b/src/common/components/forms/user/RegisterForm.js index cc5f6e2..e33f576 100644 --- a/src/common/components/forms/user/RegisterForm.js +++ b/src/common/components/forms/user/RegisterForm.js @@ -27,6 +27,10 @@ const validate = (values) => { errors.password = 'Required'; } + if (!values.isAgreeTerms) { + errors.isAgreeTerms = 'Required'; + } + if (configs.recaptcha && !values.recaptcha) { errors.recaptcha = 'Required'; } @@ -100,6 +104,30 @@ class RegisterForm extends Component { type="password" placeholder="Password" /> + + I agree the terms} + /> Recaptcha is disabled ); /* eslint-enable */ + } else if (type === 'checkbox') { + formControl = ( +
+ +
+ ); + } else if (type === 'checkboxes') { + // ref: + // - + formControl = ( + options.map((option, index) => ( +
+ +
+ )) + ); } else if (type === 'radiobutton') { // ref: formControl = (