Api: when password is too short return a 400 instead of a 404

Tried to make it generic for all attributes and in a way that can be easily propagated to other models if this approach is OK