look in the active record errors object documentation.