Skip to content
Snippets Groups Projects

Working email validation and hiding controller logic to InputField

Merged Defendi Alberto requested to merge api-login into dev
2 files
+ 8
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -74,7 +74,7 @@ export const SignInForm: FC = () => {
@@ -74,7 +74,7 @@ export const SignInForm: FC = () => {
}}
}}
label={intl.formatMessage({ id: 'email' })}
label={intl.formatMessage({ id: 'email' })}
error={!!errors.email}
error={!!errors.email}
errorMessage={intl.formatMessage({ id: 'error' })}
errorMessage={intl.formatMessage({ id: 'email-error' })}
/>
/>
<InputField
<InputField
@@ -83,11 +83,14 @@ export const SignInForm: FC = () => {
@@ -83,11 +83,14 @@ export const SignInForm: FC = () => {
rules={{
rules={{
minLength: 8,
minLength: 8,
maxLength: 60,
maxLength: 60,
required: { value: true, message: 'You must enter your name' },
required: {
 
value: true,
 
message: intl.formatMessage({ id: 'password' }),
 
},
}}
}}
label={intl.formatMessage({ id: 'password' })}
label={intl.formatMessage({ id: 'password' })}
error={!!errors.password}
error={!!errors.password}
errorMessage={intl.formatMessage({ id: 'error' })}
errorMessage={intl.formatMessage({ id: 'password-error' })}
/>
/>
<Button
<Button
Loading