$resolver->
setDefaults([ // default scale is locale specific (usually around 3)
'scale' => null,
'grouping' => false,
'rounding_mode' => \NumberFormatter::ROUND_HALFUP,
'compound' => false,
'input' => 'number',
'html5' => false,
'invalid_message' => 'Please enter a number.',
]);
$resolver->
setAllowedValues('rounding_mode',
[ \NumberFormatter::ROUND_FLOOR,
\NumberFormatter::ROUND_DOWN,
\NumberFormatter::ROUND_HALFDOWN,
\NumberFormatter::ROUND_HALFEVEN,
\NumberFormatter::ROUND_HALFUP,
\NumberFormatter::ROUND_UP,
\NumberFormatter::ROUND_CEILING,
]);
$resolver->
setAllowedValues('input',
['number', 'string'
]);
$resolver->
setAllowedTypes('scale',
['null', 'int'
]);
$resolver->
setAllowedTypes('html5', 'bool'
);