Files
cssd-back/node_modules/vuelidate/src/validators/maxValue.js
T
2019-07-15 13:07:31 +04:30

9 lines
223 B
JavaScript
Vendored

import { req, withParams } from './common'
export default (max) =>
withParams(
{ type: 'maxValue', max },
(value) =>
!req(value) ||
((!/\s/.test(value) || value instanceof Date) && +value <= +max)
)