number
Validates finite numbers (integers or floats) with optional constraints. DDataParser.number() ensures the input is a finite number, applies your checkers (min, max, int, refine, etc.) and returns an Either containing either the validated value or a rich DataParserError. NaN, Infinity, and -Infinity are rejected.
Interactive example
Parameters
errorMessage: custom message when the input is not a finite number.checkers:checkerNumberMin,checkerNumberMax,checkerInt,checkerRefine, etc.coerce:trueto convert strings/booleans before validation (viaNumber(value)). The converted value must still be finite. Defaults tofalse.
Return value
A DataParserNumber with parse, asyncParse, exec, asyncExec, addChecker, clone. parse returns DEither.success<number> if everything passes or DEither.error<DataParserError> with the accumulated issues.
