mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
Fix saving up settings
This commit is contained in:
parent
bb53ba8638
commit
d676242c8f
@ -4,15 +4,14 @@ import { translatedErrors } from '@strapi/helper-plugin';
|
||||
const URL_REGEX = new RegExp('(^$)|((https?://.*)(d*)/?(.*))');
|
||||
|
||||
const schema = yup.object().shape({
|
||||
email_confirmation_redirection: yup
|
||||
.string(translatedErrors.string)
|
||||
.matches(URL_REGEX, translatedErrors.regex)
|
||||
.nullable()
|
||||
.when('email_confirmation', {
|
||||
is: true,
|
||||
then: yup.string().required(translatedErrors.required),
|
||||
otherwise: yup.string(),
|
||||
}),
|
||||
email_confirmation_redirection: yup.mixed().when('email_confirmation', {
|
||||
is: true,
|
||||
then: yup
|
||||
.string()
|
||||
.matches(URL_REGEX)
|
||||
.required(),
|
||||
otherwise: yup.string().nullable(),
|
||||
}),
|
||||
email_reset_password: yup
|
||||
.string(translatedErrors.string)
|
||||
.matches(URL_REGEX, translatedErrors.regex)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user