I've added a zeroIsEmpty option for string decimal converters. When this is enabled, inputting 0 (or any variant thereof such as 0.00) will trigger a required error.
To accomplish this, I've invented an isEmpty hook on converters that allows you to customize the empty check. It takes a raw and outputs a boolean to determine emptiness.
I've added a
zeroIsEmpty
option for string decimal converters. When this is enabled, inputting 0 (or any variant thereof such as 0.00) will trigger a required error.To accomplish this, I've invented an
isEmpty
hook on converters that allows you to customize the empty check. It takes araw
and outputs a boolean to determine emptiness.