I want to add a validation rule for a String to exactly match on any of the Strings provided in a regex pattern. For example, status must be exactly 'Approved' or 'Pending' and nothing else.
'status' => 'required|regex:[???]'
I want to add a validation rule for a String to exactly match on any of the Strings provided in a regex pattern. For example, status must be exactly 'Approved' or 'Pending' and nothing else.
'status' => 'required|regex:[???]'