SIGN IN SIGN UP
laravel / framework UNCLAIMED

Laravel is a web application framework with expressive, elegant syntax.

0 0 135 PHP

[13.x] Fix starts_with/ends_with rules rejecting numeric values (#60120)

* fix(validation): allow numeric values in starts_with/ends_with rules

`is_string` guard introduced in #59541 incorrectly rejects numeric
values, breaking combinations like `['numeric', 'doesnt_start_with:0']`
when the value is an integer from a JSON request.

Cast to string after checking `is_string || is_numeric`, consistent
with how `validateMinDigits` and `validateMaxDigits` were fixed in the
same PR.

* test(validation): add numeric value cases for starts_with/ends_with rules
F
Fatih AYDIN committed
b0c2aaca83737baed213d0957a57ff9f25d9ebd5
Parent: 32ec0a0
Committed by GitHub <noreply@github.com> on 5/14/2026, 5:25:15 PM