mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Allow empty value for isPath validator
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
1ef3a3cb5b
commit
f1f7705228
@ -45,7 +45,7 @@ export const isUrl: Validator = {
|
||||
export const isPath: Validator = {
|
||||
condition: ({ type }) => type === "text",
|
||||
message: () => _i18n._(t`This field must be a path to an existing file`),
|
||||
validate: value => fse.pathExistsSync(value),
|
||||
validate: value => !value || fse.pathExistsSync(value),
|
||||
}
|
||||
|
||||
export const minLength: Validator = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user