Skip to content

Files

Latest commit

9740e24 · Jan 6, 2025

History

History
27 lines (18 loc) · 475 Bytes

Nullable.md

File metadata and controls

27 lines (18 loc) · 475 Bytes

Nullable

  • Nullable(Validatable $rule)

Validates the given input with a defined rule when input is not NULL.

v::nullable(v::email())->isValid(null); // true
v::nullable(v::email())->isValid('example@example.com'); // true
v::nullable(v::email())->isValid('not an email'); // false

Categorization

  • Nesting

Changelog

Version Description
2.0.0 Created

See also: