Merge pull request #3425 from benjiwheeler/join-flow-truncate-custom-gender

truncate custom gender, and other inputs
This commit is contained in:
Benjamin Wheeler 2019-10-07 12:47:58 -04:00 committed by GitHub
commit 3a06ad81b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -174,7 +174,7 @@ class EmailStep extends React.Component {
/* eslint-disable react/jsx-no-bind */
onBlur={() => validateField('email')}
onChange={e => {
setFieldValue('email', e.target.value);
setFieldValue('email', e.target.value.substring(0, 254));
setFieldTouched('email');
setFieldError('email', null);
}}

View file

@ -150,8 +150,8 @@ class GenderStep extends React.Component {
value={values.custom}
/* eslint-disable react/jsx-no-bind */
onSetCustom={newCustomVal => setValues({
gender: newCustomVal,
custom: newCustomVal
gender: newCustomVal.substring(0, 25),
custom: newCustomVal.substring(0, 25)
})}
onSetCustomRef={this.handleSetCustomRef}
/* eslint-enable react/jsx-no-bind */

View file

@ -157,7 +157,7 @@ class UsernameStep extends React.Component {
/* eslint-disable react/jsx-no-bind */
onBlur={() => validateField('username')}
onChange={e => {
setFieldValue('username', e.target.value);
setFieldValue('username', e.target.value.substring(0, 30));
setFieldTouched('username');
setFieldError('username', null);
}}
@ -187,7 +187,7 @@ class UsernameStep extends React.Component {
validationClassName="validation-full-width-input"
onBlur={() => validateField('password')}
onChange={e => {
setFieldValue('password', e.target.value);
setFieldValue('password', e.target.value.substring(0, 128));
setFieldTouched('password');
setFieldError('password', null);
}}
@ -225,7 +225,7 @@ class UsernameStep extends React.Component {
validationClassName="validation-full-width-input"
onBlur={() => validateField('passwordConfirm')}
onChange={e => {
setFieldValue('passwordConfirm', e.target.value);
setFieldValue('passwordConfirm', e.target.value.substring(0, 128));
setFieldTouched('passwordConfirm');
setFieldError('passwordConfirm', null);
}}