Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.03 KB

Alpha.md

File metadata and controls

48 lines (37 loc) · 1.03 KB

Alpha

  • Alpha()
  • Alpha(string ...$additionalChars)

Validates whether the input contains only alphabetic characters. This is similar to Alnum, but it does not allow numbers.

v::alpha()->isValid('some name'); // false
v::alpha(' ')->isValid('some name'); // true
v::alpha()->isValid('Cedric-Fabian'); // false
v::alpha('-')->isValid('Cedric-Fabian'); // true
v::alpha('-', '\'')->isValid('\'s-Gravenhage'); // true

You can restrict case using the Lowercase and Uppercase rules.

v::alpha()->uppercase()->isValid('example'); // false

Categorization

  • Strings

Changelog

Version Description
2.0.0 Removed support to whitespaces by default
0.3.9 Created

See also: