indicative icon indicating copy to clipboard operation
indicative copied to clipboard

Field required but can accept empty string

Open soubhikchatterjee opened this issue 3 years ago • 1 comments

Is it possible to validate a field to make the key mandatory but allow empty string in it?

The required validation does check for the existence of a key but does not allow empty values.

Am i missing something here?

Thanks in advance.

soubhikchatterjee avatar Jan 19 '21 17:01 soubhikchatterjee

For example Laravel has a present rule for this scenario that is very useful: https://laravel.com/docs/8.x/validation#rule-present

JannieT avatar Sep 06 '21 15:09 JannieT