Report specific password constraint violations
Currently, the server (and thus the "specification") only tells you that your password is invalid if it breaks any number of constraints, but doesn't say specifically which. There are a number of solutions to this problem, and I think the best is to create a new extensible enum (e.g. #[non_exhaustive]
) with a variant for each constraint, and change create_account::Error::Invalid
to ...::Invalid(Vec<ViolatedConstraint>)
.