Is there a way in joi to change '' or ' ' to null for all optional parameters that are strings?
Right now I have to pass a .allow('') when a parameter is because joi by default does not accept '' and then i have to check each parameter to see if its blank and rename to null.
Can a setting be added to sanitize all empty string and string with spaces to null and an option to allow empty strings?
Is there a way in joi to change '' or ' ' to null for all optional parameters that are strings?
Right now I have to pass a .allow('') when a parameter is because joi by default does not accept '' and then i have to check each parameter to see if its blank and rename to null.
Can a setting be added to sanitize all empty string and string with spaces to null and an option to allow empty strings?