Class: AimValidator

Inherits:
AccountNameValidator show all
Defined in:
lib/aim_validator.rb

Overview

Validates AOL Instant Messenger screen names. According to the AOL website:

> 3-16 letters or numbers. It must start with a letter.

The following error message keys are used to localize invalid screen names:

| | | |:————————-|:—————————————–| | ‘aim_too_short` | Screen name is less than 3 characters. | | `aim_too_long` | Screen name is over 16 characters. | | `aim_invalid_chars` | Screen name contains invalid characters. | | `aim_invalid_first_char` | Screen name doesn’t start with a letter. |

Options


| | | |:————-|:————————————————-| | ‘:message` | A custom message to use if the email is invalid. | | `:allow_nil` | If true, `nil` values are allowed. |

Examples:

validates :aim_screen_name, aim: true

Method Summary

Methods inherited from AccountNameValidator

add_validation, error_key_prefix, first_char, max_length, min_length, valid_chars, #validate_each