Skip to content

Commit

Permalink
Better schedule validation regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
setaou committed May 21, 2015
1 parent a6630f0 commit f99c9bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/form-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ formValidation.directive('validateSchedule', function() {
return true;
}

if (/^(\*(\/[0-9]+)?|[0-9]+(,[0-9]+)*)$/.test(viewValue)) {
if (/^(\d+(-\d+)?|\*(\/\d+)?)(,(\d+(-\d+)?|\*(\/\d+)?))*$/.test(viewValue)) {
// it is valid
return true;
}
Expand Down

0 comments on commit f99c9bd

Please sign in to comment.