mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	Merge pull request #12091 from strapi/fix/12089
Add lowercase validation to email for registering admin user.
This commit is contained in:
		
						commit
						0605c0e25e
					
				@ -178,7 +178,10 @@ const Register = ({ fieldsToDisable, noSignin, onSubmit, schema }) => {
 | 
			
		||||
                        : undefined
 | 
			
		||||
                    }
 | 
			
		||||
                    required
 | 
			
		||||
                    label={formatMessage({ id: 'Auth.form.email.label', defaultMessage: 'Email' })}
 | 
			
		||||
                    label={formatMessage({
 | 
			
		||||
                      id: 'Auth.form.email.label',
 | 
			
		||||
                      defaultMessage: 'Email',
 | 
			
		||||
                    })}
 | 
			
		||||
                    type="email"
 | 
			
		||||
                  />
 | 
			
		||||
                  <PasswordInput
 | 
			
		||||
 | 
			
		||||
@ -94,6 +94,8 @@ const forms = {
 | 
			
		||||
      email: yup
 | 
			
		||||
        .string()
 | 
			
		||||
        .email(translatedErrors.email)
 | 
			
		||||
        .strict()
 | 
			
		||||
        .lowercase(translatedErrors.lowercase)
 | 
			
		||||
        .required(translatedErrors.required),
 | 
			
		||||
      confirmPassword: yup
 | 
			
		||||
        .string()
 | 
			
		||||
 | 
			
		||||
@ -407,6 +407,7 @@
 | 
			
		||||
  "components.Input.error.password.noMatch": "Passwords do not match",
 | 
			
		||||
  "components.Input.error.validation.email": "This is an invalid email",
 | 
			
		||||
  "components.Input.error.validation.json": "This doesn't match the JSON format",
 | 
			
		||||
  "components.Input.error.validation.lowercase": "The value must be a lowercase string",
 | 
			
		||||
  "components.Input.error.validation.max": "The value is too high.",
 | 
			
		||||
  "components.Input.error.validation.maxLength": "The value is too long.",
 | 
			
		||||
  "components.Input.error.validation.min": "The value is too low.",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,7 @@
 | 
			
		||||
const errorsTrads = {
 | 
			
		||||
  email: 'components.Input.error.validation.email',
 | 
			
		||||
  json: 'components.Input.error.validation.json',
 | 
			
		||||
  lowercase: 'components.Input.error.validation.lowercase',
 | 
			
		||||
  max: 'components.Input.error.validation.max',
 | 
			
		||||
  maxLength: 'components.Input.error.validation.maxLength',
 | 
			
		||||
  min: 'components.Input.error.validation.min',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user