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

Order of execution of validation rules #439

Closed
sreenadh opened this issue Sep 7, 2018 · 1 comment
Closed

Order of execution of validation rules #439

sreenadh opened this issue Sep 7, 2018 · 1 comment

Comments

@sreenadh
Copy link

sreenadh commented Sep 7, 2018

schema = {
'work_start_time': {
'type' : 'string',
'empty' : False,
'required' : True,
'regex' : "(((0[1-9])|(1[0-2])):([0-5])(0|5)\s(a|A|p|P)(m|M))",
'compare_time': {'field': 'work_end_time', 'operator': '<', 'format': '%I:%M %p'}
}
}

I want the rule "regex" to be executed before my custom validation rule "compare_time". But it's not happening.

Version: 1.2
Python 2.7.15
Darwin Mac.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

@sreenadh sreenadh changed the title Order of validation rules Order of execution of validation rules Sep 7, 2018
@funkyfuture
Copy link
Member

please have a look at the code. there are class properties that can define the order in which rules are evaluated. unfortunately they don't appear in the API docs (may be related to #343).

also, please stop surveilling the working class!

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