Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex for form keys. #2

Closed
DrLulz opened this issue Feb 6, 2016 · 0 comments
Closed

Regex for form keys. #2

DrLulz opened this issue Feb 6, 2016 · 0 comments

Comments

@DrLulz
Copy link

DrLulz commented Feb 6, 2016

I have a form which contains a variable number of fields notated as p1_value, p2_value, p3_value, etc. (e.g. sometimes there may only be p1 and p2, yet other times they may be a p4). How can I represent this when validating the form? Thank you.

form = {
        '_value': [
            Regexp(SOME_PATTERN, message=u'MESSAGE')
        ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants