respect-validation/docs/rules/Xdigit.md

35 lines
516 B
Markdown
Raw Normal View History

2015-01-30 09:40:06 +01:00
# Xdigit
- `Xdigit()`
- `Xdigit(string ...$additionalChars)`
2015-01-30 09:40:06 +01:00
Validates whether the input is an hexadecimal number or not.
2015-01-30 09:40:06 +01:00
```php
v::xdigit()->validate('abc123'); // true
2015-01-30 09:40:06 +01:00
```
Notice, however, that it doesn't accept strings starting with 0x:
```php
v::xdigit()->validate('0x1f'); // false
2015-01-30 09:40:06 +01:00
```
## Categorization
- Strings
## Changelog
Version | Description
--------|-------------
0.5.0 | Created
***
2015-01-30 09:40:06 +01:00
See also:
- [Alnum](Alnum.md)
- [Decimal](Decimal.md)
2018-12-11 13:31:50 +01:00
- [Digit](Digit.md)
- [HexRgbColor](HexRgbColor.md)