mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Merge pull request #3425 from benjiwheeler/join-flow-truncate-custom-gender
truncate custom gender, and other inputs
This commit is contained in:
commit
3a06ad81b1
3 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
}}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue