BigW Consortium Gitlab

Commit d48658e3 by Shinya Maeda

Use constraint for #validation

parent 13bac4c2
......@@ -12,8 +12,10 @@ module Ci
end
def validation
is_valid_cron = try_parse_cron(@cron, 'Europe/Istanbul').present?
is_valid_cron_time_zone = try_parse_cron('* * * * *', @cron_time_zone).present?
VALID_SYNTAX_TIME_ZONE = 'Europe/Istanbul'
VALID_SYNTAX_CRON = '* * * * *'
is_valid_cron = try_parse_cron(@cron, VALID_SYNTAX_TIME_ZONE).present?
is_valid_cron_time_zone = try_parse_cron(VALID_SYNTAX_CRON, @cron_time_zone).present?
return is_valid_cron, is_valid_cron_time_zone
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment