pub(crate) fn new_password(field: &Field) -> Result<Zeroizing<String>, String>Expand description
A password for field: under its passwordrules, else its minlength and
maxlength, else the defaults, clipped to maxlength. Rules that can’t be
read are dropped (the length limits still hold); rules that can are the
site’s, so when they leave no strong password, or contradict each other,
none is made rather than one the site would refuse. minlength is a floor,
never clipped: a field whose most allowed is shorter gets no password.