Flowdock
valid?() public

Checks for errors on an object (i.e., is resource.errors empty?).

Examples

  my_person = Person.create(params[:person])
  my_person.valid?
  # => true

  my_person.errors.add('login', 'can not be empty') if my_person.login == ''
  my_person.valid?
  # => false
Show source
Register or log in to add new notes.