--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: "[]"
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A method to return the errors associated with <tt>attribute</tt>, which returns nil, if no errors are associated with the specified <tt>attribute</tt>, the error message if one error is associated with the specified <tt>attribute</tt>, or an array of error messages if more than one error is associated with the specified <tt>attribute</tt>.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  my_person = Person.new(params[:person])\n  my_person.errors.on('login')\n  # =&gt; nil\n\n  my_person.errors.add('login', 'can not be empty') if my_person.login == ''\n  my_person.errors.on('login')\n  # =&gt; 'can not be empty'\n\n  my_person.errors.add('login', 'can not be longer than 10 characters') if my_person.login.length &gt; 10\n  my_person.errors.on('login')\n  # =&gt; ['can not be empty', 'can not be longer than 10 characters']\n"
full_name: ActiveResource::Errors#on
is_singleton: false
name: "on"
params: (attribute)
visibility: public
