Class: XboxLiveValidator
- Inherits:
-
AccountNameValidator
- Object
- ActiveModel::EachValidator
- AccountNameValidator
- XboxLiveValidator
- Defined in:
- lib/xbox_live_validator.rb
Overview
Validates Xbox Live gamertags. From the Xbox Live website:
bq. Gamertags can only contain letters, numbers, and spaces, and can’t begin with a number.
In addition we discovered that they have no minimum length but are no more than 15 characters, and also cannot start with a space.
The following error message keys are used to localize invalid screen names.
| @xbox_too_long@ | Gamertag is over 15 characters. | | @xbox_invalid_chars@ | Gamertag contains invalid characters. | | @xbox_invalid_first_char@ | Gamertag doesn’t start with a letter. |