1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix isPath message (#860)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-09-11 17:02:56 +03:00 committed by GitHub
parent 9d9867f674
commit cc973bb9ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ export const isUrl: Validator = {
export const isPath: Validator = { export const isPath: Validator = {
condition: ({ type }) => type === "text", condition: ({ type }) => type === "text",
message: () => _i18n._(t`This field must be a path to an existing file`), message: () => _i18n._(t`This field must be a valid path`),
validate: value => !value || fse.pathExistsSync(value), validate: value => !value || fse.pathExistsSync(value),
} }
@ -73,4 +73,4 @@ export const accountId: Validator = {
export const conditionalValidators = [ export const conditionalValidators = [
isRequired, isEmail, isNumber, isUrl, minLength, maxLength isRequired, isEmail, isNumber, isUrl, minLength, maxLength
]; ];