X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fschema%2Fyup.js;h=501d79e01db8bc0e7db0931f44cede0f643680f9;hb=b874da96f3fbd49635a68d3729af357178d42fc7;hp=bc506bc4004c394c655cfc64c3db9a2e0d6f626b;hpb=812a270c7a410461e931394496512d36b34ef7b5;p=alttp.git diff --git a/resources/js/schema/yup.js b/resources/js/schema/yup.js index bc506bc..501d79e 100644 --- a/resources/js/schema/yup.js +++ b/resources/js/schema/yup.js @@ -7,7 +7,7 @@ yup.addMethod(yup.string, 'time', function (errorMessage) { const { path, createError } = this; return ( !value || - parseTime(value) || + !isNaN(parseTime(value)) || createError({ path, message: errorMessage || 'validation.error.time' }) ); });