laravel / ideas

Issues board used for Laravel internals discussions.
939 stars 28 forks source link

Custom Validation if field is set #2616

Closed samuel-lujan closed 3 years ago

samuel-lujan commented 3 years ago

I want some field get some custom validation from some lib. Only if this field is set.

for example:

if telphone is set then a want telphone be like (XX)XXXX-XXXX

samuel-lujan commented 3 years ago

I had Done with

'telephone' => 'nullable|telefone_com_ddd'