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
- Strings
Version | Description |
---|---|
2.0.0 | Removed support to whitespaces by default |
0.3.9 | Created |
See also: