1 import * as yup from 'yup';
3 import { parseTime } from '../helpers/Result';
5 yup.addMethod(yup.string, 'time', function (errorMessage) {
6 return this.test('test-time-format', errorMessage, function (value) {
7 const { path, createError } = this;
10 createError({ path, message: errorMessage || 'validation.error.time' })
17 default: 'validation.error.general',
18 required: 'validation.error.required',
21 time: 'validation.error.time',