def validates_report(obj): checker = Checker() check = True _ = obj._ checker.errors = [] if is_param(obj.input, 'report_start_day'): check = checker.check_datetime_string(_('Start Date'), obj.input.report_start_day, CHECK_EMPTY | CHECK_VALID, obj.me.languages, ) and check if is_param(obj.input, 'report_end_day'): check = checker.check_datetime_string(_('End Date'), obj.input.report_end_day, CHECK_EMPTY | CHECK_VALID, obj.me.languages, ) and check if is_param(obj.input, 'report_start_time'): check = checker.check_time_string(_('Start Time'), obj.input.report_start_time, CHECK_EMPTY | CHECK_VALID, ) and check if is_param(obj.input, 'report_end_time'): check = checker.check_time_string(_('End Time'), obj.input.report_end_time, CHECK_EMPTY | CHECK_VALID, ) and check obj.view.alert = checker.errors return check
def validates_log(obj): checker = Checker() check = True _ = obj._ checker.errors = [] if is_param(obj.input, 's'): check = checker.check_datetime_string(_('Start Date'), obj.input.s, CHECK_EMPTY | CHECK_VALID, obj.me.languages, ) and check if is_param(obj.input, 'e'): check = checker.check_datetime_string(_('End Date'), obj.input.e, CHECK_EMPTY | CHECK_VALID, obj.me.languages, ) and check if is_param(obj.input, 'st'): check = checker.check_time_string(_('Start Time'), obj.input.st, CHECK_EMPTY | CHECK_VALID, ) and check if is_param(obj.input, 'et'): check = checker.check_time_string(_('End Time'), obj.input.et, CHECK_EMPTY | CHECK_VALID, ) and check obj.view.alert = checker.errors return check
def validates_log(obj): checker = Checker() check = True _ = obj._ checker.errors = [] if is_param(obj.input, "s"): check = ( checker.check_datetime_string(_("Start Date"), obj.input.s, CHECK_EMPTY | CHECK_VALID, obj.me.languages) and check ) if is_param(obj.input, "e"): check = ( checker.check_datetime_string(_("End Date"), obj.input.e, CHECK_EMPTY | CHECK_VALID, obj.me.languages) and check ) if is_param(obj.input, "st"): check = checker.check_time_string(_("Start Time"), obj.input.st, CHECK_EMPTY | CHECK_VALID) and check if is_param(obj.input, "et"): check = checker.check_time_string(_("End Time"), obj.input.et, CHECK_EMPTY | CHECK_VALID) and check obj.view.alert = checker.errors return check
def validates_log(obj): checker = Checker() check = True _ = obj._ checker.errors = [] if is_param(obj.input, 's'): check = checker.check_datetime_string( _('Start Date'), obj.input.s, CHECK_EMPTY | CHECK_VALID, obj.me.languages, ) and check if is_param(obj.input, 'e'): check = checker.check_datetime_string( _('End Date'), obj.input.e, CHECK_EMPTY | CHECK_VALID, obj.me.languages, ) and check if is_param(obj.input, 'st'): check = checker.check_time_string( _('Start Time'), obj.input.st, CHECK_EMPTY | CHECK_VALID, ) and check if is_param(obj.input, 'et'): check = checker.check_time_string( _('End Time'), obj.input.et, CHECK_EMPTY | CHECK_VALID, ) and check obj.view.alert = checker.errors return check
def validates_report(obj): checker = Checker() check = True _ = obj._ checker.errors = [] if is_param(obj.input, 'report_start_day'): check = checker.check_datetime_string( _('Start Date'), obj.input.report_start_day, CHECK_EMPTY | CHECK_VALID, obj.me.languages, ) and check if is_param(obj.input, 'report_end_day'): check = checker.check_datetime_string( _('End Date'), obj.input.report_end_day, CHECK_EMPTY | CHECK_VALID, obj.me.languages, ) and check if is_param(obj.input, 'report_start_time'): check = checker.check_time_string( _('Start Time'), obj.input.report_start_time, CHECK_EMPTY | CHECK_VALID, ) and check if is_param(obj.input, 'report_end_time'): check = checker.check_time_string( _('End Time'), obj.input.report_end_time, CHECK_EMPTY | CHECK_VALID, ) and check obj.view.alert = checker.errors return check