feat(lagoon): accept string and url rules in lagoon.Validate (quick-261104-f4x)

- string requires a string value (pointers and named string types
  included), url a URL matching Laravel's pattern (urlPattern, shared
  with lagoon.ValidateRequest); both skip an empty or blank value
- lagoon::validate.string and .url in the en and pl catalogs, English
  fallbacks for a nil translator
- settings saves whose model rules use nullable|string|max:255 or
  nullable|url|max:500 no longer fail with an unrecognized-rule error
This commit is contained in:
Jakub Zych
2026-11-04 11:08:06 +01:00
parent 617eaef78e
commit d2ce3a2c3b
7 changed files with 270 additions and 2 deletions

View File

@@ -11,3 +11,5 @@ max: "The :attribute may not be greater than :max."
min: "The :attribute must be at least :min."
oneof: "The selected :attribute is invalid."
mimes: "The :attribute must be a file of the allowed types."
string: "The :attribute must be a string."
url: "The :attribute format is invalid."

View File

@@ -11,3 +11,5 @@ max: ":attribute nie może być dłuższy niż :max znaków."
min: ":attribute musi mieć przynajmniej :min znaków."
oneof: "Zaznaczony :attribute jest nieprawidłowy."
mimes: ":attribute musi być plikiem typu :values."
string: ":attribute musi być ciągiem znaków."
url: "Format :attribute jest nieprawidłowy."