rename validate to getError