I
I
ildar-meyker2021-02-20 22:36:54
Laravel
ildar-meyker, 2021-02-20 22:36:54

How important is it from the point of view of common sense to specify the string rule in the validation rules?

I often see examples on the net where someone uses or does not use this rule.

Even in the Laravel source code itself, when registering a password, the required|string|min:8|confirmed rule applies, while when resetting a password, it is already required|min:8|confirmed.

Is it possible to imagine a scenario where the code could be sensitive to this difference?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Adamos, 2021-02-20
@Adamos

For example, if an API is written in Lara that accepts data in json.
Not that it becomes a problem or a vulnerability, but it will help to catch the joint faster.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question