mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
allow i18n error messages with pattern validation
This commit is contained in:
parent
679cbde646
commit
fd21c9f406
1 changed files with 1 additions and 2 deletions
|
@ -218,8 +218,7 @@ export function formatYunoHostArgument (arg) {
|
|||
validation.required = validators.required
|
||||
}
|
||||
if (arg.pattern && arg.type !== 'tags') {
|
||||
// validation.pattern = validators.helpers.withMessage(arg.pattern.error,
|
||||
validation.pattern = validators.helpers.regex(arg.pattern.error, new RegExp(arg.pattern.regexp))
|
||||
validation.pattern = validators.helpers.regex(formatI18nField(arg.pattern.error), new RegExp(arg.pattern.regexp))
|
||||
}
|
||||
validation.remote = validators.helpers.withParams(error, (v) => {
|
||||
const result = !error.message
|
||||
|
|
Loading…
Reference in a new issue