def validate_new(cls): return super(Account, cls).validate_new() + [ quorum.not_null("username"), quorum.not_empty("username"), quorum.string_gt("username", 4), quorum.string_lt("username", 64), quorum.not_duplicate("username", cls._name()), quorum.not_null("password"), quorum.not_empty("password"), quorum.not_null("password_confirm"), quorum.not_empty("password_confirm"), quorum.not_null("email"), quorum.not_empty("email"), quorum.is_email("email"), quorum.not_duplicate("email", cls._name()), quorum.not_null("email_confirm"), quorum.not_empty("email_confirm"), quorum.not_null("plan"), quorum.not_empty("plan"), quorum.is_in("plan", ("test", "basic", "advanced")), quorum.equals("password_confirm", "password"), quorum.equals("email_confirm", "email") ]
def validate(cls): return super(Account, cls).validate() + [ quorum.equals("password_confirm", "password") ]