-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
good first issueGood for newcomersGood for newcomersnew ruleImplementing new Rule classImplementing new Rule class
Description
Rule Name: DateFormat
Rule Arguments:
- format - String that represents python datetime format
Rule Description:
The field under validation must match the given format
Rule Usage Example:
reqs = {'data' : '2018-06-29 08:15:27'}
rule = {'data' : 'date_format:%Y-%m-%d %H:%M:%S'}
validate(reqs, rule) # True
reqs = {'data' : '2018-06-29 08:15:27'}
rule = {'data' : 'date_format:%Y-%m-%d'}
validate(reqs, rule) # False, because 08:15:27 is unconverted dataBefore contributing please review RULES.md (check for duplication), also check CONTRIBUTING.md for more details 💯
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersnew ruleImplementing new Rule classImplementing new Rule class