mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 10:41:06 +03:30
9 lines
223 B
JavaScript
Vendored
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)
|
|
)
|