Commit 6b5ea165 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov
Browse files

Merge branch '558-false-and-0-not-recognized-as-values' into 'master'

Resolve "false and 0 not recognized as values"

Closes #558

See merge request genesys-pgr/genesys-ui!546
parents 6e4ab1d7 b724bfe9
export default class Validators {
public static required = (value) => value ? undefined : 'public.validate.required';
public static required = (value) => value || value === false || value === 0 ? undefined : 'public.validate.required';
public static decimalNumber = (value) => ! value || typeof value === 'number' || value.match(/^[\+\-]?\d+(\.\d+)?$/g) ? undefined : 'public.validate.numberExpected';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment