M
M
Maxim Pritchin2019-10-05 23:27:17
Laravel
Maxim Pritchin, 2019-10-05 23:27:17

How to do pairwise validation in laravel?

How to do pairwise validation?
For example, I have a first and last name, I need to check if a person has the same first and last name at the same time.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alex Wells, 2019-10-06
@pritchin_maxim1

If you need BATCH, then it's useless to try to use the standard validation rules. You can try to take the standard validator and make possible optimizations for the field.* rules if you have enough experience and consider it appropriate. Otherwise - score and use the standard rules.

D
Daria Motorina, 2019-10-05
@glaphire

Try Rule:unique

C
Camaro67, 2019-10-05
@Camaro67

Make the rule you need using a closure . How to make a request to the database with the necessary fields, I think you will figure it out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question