Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Field required but can accept empty string #263

Open
soubhikchatterjee opened this issue Jan 19, 2021 · 1 comment
Open

Field required but can accept empty string #263

soubhikchatterjee opened this issue Jan 19, 2021 · 1 comment

Comments

@soubhikchatterjee
Copy link

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.

@JannieT
Copy link

JannieT commented Sep 6, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants