Skip to content

Add bundled default english validation messages#90

Merged
benkhalife merged 3 commits into
masterfrom
add-bundled-default-english-validation-messages
Jun 15, 2026
Merged

Add bundled default english validation messages#90
benkhalife merged 3 commits into
masterfrom
add-bundled-default-english-validation-messages

Conversation

@benkhalife

Copy link
Copy Markdown
Member

No description provided.

- loadMessages() no longer throws when langs/{locale}/validation.php
  is missing in the consuming application.
- Add resolution order: app translation file -> package default for
  active locale -> package default for "en".
- Add DEFAULT_MESSAGES_PATH constant pointing to resources/lang
  inside the package.
- Fix validateBetween() to return a nested ['between', type]
  messageKey, consistent with min/max, so translations resolve
  correctly for string/numeric/array values.
- Update constructor docblock to drop the obsolete @throws tag.
Fixed #88
- Cover all validation rules (required, string, alpha, alpha_num,
  numeric, integer, boolean, digits, digits_between, different,
  confirmed, min, max, between, email, phone, url, domain, mac, ip,
  array, object, regex, in, not_in, json, date).
- Cover nullable() and sometimes() field modifiers.
- Cover validate(), isValid(), fails(), passes(), getErrors(),
  getFirstError(), getFirstErrorMessage().
- Cover custom messages, :attribute label substitution, and
  default messages resolved from the package's bundled
  resources/lang/en/validation.php.
- Cover ReDoS pattern rejection in regex() and value
  trimming/sanitization in getValue().

Close #89
@benkhalife benkhalife linked an issue Jun 15, 2026 that may be closed by this pull request
@benkhalife
benkhalife merged commit fd81cb0 into master Jun 15, 2026
1 check passed
@benkhalife
benkhalife deleted the add-bundled-default-english-validation-messages branch June 21, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bundled default English validation messages

1 participant