You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✏️ Describe the bug
Usage of the validation Attributes
#[GreaterThan]
#[GreaterThanOrEqualTo]
#[LessThan]
#[LessThanOrEqualTo]
is not fully compatible with the laravel implemetation of the corresponding validation rules. While the laravel documentation allows a fieldor a comparison value to be passed, the implementation in laravel-data always tries to evaluate the given value as a field reference.
https://laravel.com/docs/11.x/validation#rule-gt
The field under validation must be greater than the given field or value. The two fields must be of the same type. Strings, numerics, arrays, and files are evaluated using the same conventions as the size rule.
The constructor method of those validation rules looks like:
✏️ Describe the bug
Usage of the validation Attributes
is not fully compatible with the laravel implemetation of the corresponding validation rules. While the laravel documentation allows a
field
or acomparison value
to be passed, the implementation in laravel-data always tries to evaluate the given value as a field reference.The constructor method of those validation rules looks like:
✅ Expected behavior
When a string is passed to the constructor it is evaluated as a comparision value instead of a field reference.
🖥️ Versions
Laravel: 10+
Laravel Data: 4
PHP: 8
The text was updated successfully, but these errors were encountered: