Class: YahooImValidator
- Inherits:
-
AccountNameValidator
- Object
- ActiveModel::EachValidator
- AccountNameValidator
- YahooImValidator
- Defined in:
- lib/yahoo_im_validator.rb
Overview
Validates Yahoo! Instant Messenger screen names. According to the Yahoo! website:
Use 4 to 32 characters and start with a letter. You may use letters, numbers, underscores, and one dot (.).
The following error message keys are used to localize invalid screen names:
| | |
|:-------------------------|:--------------------------------------------|
| yim_too_short | Screen name is fewer than 3 characters. |
| yim_too_long | Screen name is over 16 characters. |
| yim_invalid_chars | Screen name contains invalid characters. |
| yim_invalid_first_char | Screen name doesn't start with a letter. |
| yim_multiple_periods | Screen name has more than one period in it. |
Options
| | |
|:-------------|:-------------------------------------------------|
| :message | A custom message to use if the email is invalid. |
| :allow_nil | If true, nil values are allowed. |
Method Summary
Methods inherited from AccountNameValidator
add_validation, error_key_prefix, first_char, max_length, min_length, valid_chars, #validate_each