Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/strapi-admin/admin/src/validations/users/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import * as yup from 'yup';
import { translatedErrors } from 'strapi-helper-plugin';
const schema = {
firstname: yup.mixed().required(translatedErrors.required),
lastname: yup.mixed().required(translatedErrors.required),
email: yup
.string()
.email(translatedErrors.email)
.lowercase()
.required(translatedErrors.required),
username: yup.string().nullable(),
password: yup
.string()
.min(8, translatedErrors.minLength)
.matches(/[a-z]/, 'components.Input.error.contain.lowercase')
.matches(/[A-Z]/, 'components.Input.error.contain.uppercase')
.matches(/\d/, 'components.Input.error.contain.number'),
confirmPassword: yup
.string()
.min(8, translatedErrors.minLength)
.oneOf([yup.ref('password'), null], 'components.Input.error.password.noMatch')
.when('password', (password, passSchema) => {
return password ? passSchema.required(translatedErrors.required) : passSchema;
}),
preferedLanguage: yup.string().nullable(),
};
export default schema;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0035 ]-- |