also returns an errors hash, like rails does