Hello,

On Sat, 16 May 2015 17:04:06 +0200
Andrew Shadura <[email protected]> wrote:

>                      raise formencode.Invalid(msg, value, state,
> -                        error_dict=dict(username=msg, password=msg2)
> +                        error_dict=dict(username=' ',password=msg)
>                      )
>      return _validator

I forgot to comment on this. This dict specifies which fields should be
assigned what error messages. If I pass msg as both, the same error
message is displayed twice, which is a bit ugly (even though it can be
solved using CSS, probably). If I pass just one, the other field isn't
highlighted. I haven't found a way in formencode to just highlight a
field without adding an error message to it, so I have worked it around
this way.

-- 
Cheers,
  Andrew

Attachment: pgpoOKTNSm85m.pgp
Description: OpenPGP digital signature

_______________________________________________
kallithea-general mailing list
[email protected]
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to