validation to controllers