Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 554 Bytes

Optional.md

File metadata and controls

31 lines (22 loc) · 554 Bytes

Optional

  • Optional(Validatable $rule)

Validates if the given input is optional or not. By optional we consider null or an empty string ('').

v::optional(v::alpha())->isValid(''); // true
v::optional(v::digit())->isValid(null); // true

Categorization

  • Nesting

Changelog

Version Description
1.0.0 Created

See also: