node-input-validator icon indicating copy to clipboard operation
node-input-validator copied to clipboard

Tiny Suggestion

Open OSonntag opened this issue 3 years ago • 0 comments

I have a tiny suggestion. the rule boolean allows none boolean types to pass like 'true' or 1.

Thats totally fine, but in most cases you want the real boolean to show up in your server code. At the moment you can set booleanStrict as rule (but most devs will forget that i think, and suddenly someone write false data into a document db).

So why not allowing boolean the values 'true' 'on' 1 and so forth but when the v.data() method is called those values will automatically be converted to real booleans unless you specifiy the rule booleanPreserveType

OSonntag avatar Dec 28 '22 05:12 OSonntag