mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Increase user full_name max length to 64 characters (#403)
This commit is contained in:
committed by
GitHub
parent
3c6b885391
commit
5decb702f2
@@ -73,7 +73,7 @@ const TenantSignUpP = ({
|
||||
const [goneBack, setGoneBack] = useState(false);
|
||||
|
||||
const [userData, setUserData] = useState({
|
||||
fullName: oAuthLoginCompleted ? oauthUserName : '',
|
||||
fullName: (oAuthLoginCompleted && oauthUserName) ? oauthUserName.slice(0, 64) : '',
|
||||
email: oAuthLoginCompleted ? oauthUserEmail : '',
|
||||
password: '',
|
||||
passwordConfirmation: '',
|
||||
|
||||
@@ -102,13 +102,15 @@ const UserSignUpForm = ({
|
||||
|
||||
<div className="formRow">
|
||||
<input
|
||||
{...register('fullName', { required: true, minLength: 2 })}
|
||||
{...register('fullName', { required: true, minLength: 2, maxLength: 64 })}
|
||||
autoFocus
|
||||
placeholder={getLabel('user', 'full_name')}
|
||||
id="userFullName"
|
||||
className="formControl"
|
||||
/>
|
||||
<DangerText>{errors.fullName && getValidationMessage('required', 'user', 'full_name')}</DangerText>
|
||||
<DangerText>{errors.fullName?.type === 'required' && getValidationMessage('required', 'user', 'full_name')}</DangerText>
|
||||
<DangerText>{errors.fullName?.type === 'minLength' && (getLabel('user', 'full_name') + ' ' + I18n.t('activerecord.errors.messages.too_short', { count: 2 }))}</DangerText>
|
||||
<DangerText>{errors.fullName?.type === 'maxLength' && (getLabel('user', 'full_name') + ' ' + I18n.t('activerecord.errors.messages.too_long', { count: 64 }))}</DangerText>
|
||||
</div>
|
||||
|
||||
<div className="formRow">
|
||||
|
||||
Reference in New Issue
Block a user