-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken validator test due to new DSL structure.
- Loading branch information
1 parent
80869d1
commit bd70ec4
Showing
3 changed files
with
21 additions
and
19 deletions.
There are no files selected for viewing
23 changes: 18 additions & 5 deletions
23
...tests/models/de/wwu/md2/framework/tests/dsl/controller/validator/InputFieldValidators.md2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
package controllers | ||
|
||
action CustomAction assignValidators { | ||
bind validators NotNullValidator (message "ID must not be null!") NumberRangeValidator (message "ID must between 1 and 666!") on complaintView.complaintID | ||
bind validator StringRangeValidator (maxLength 150, minLength 1, message "the string is too short or too long!") on complaintView.descriptionTxt | ||
bind validator RegExValidator (regEx "[A-Za-Z]+@[a-z]{2,6}", message "that's not a valid email address") on complaintView.userEmail | ||
bind validator DateRangeValidator (min 1900-01-01, message "the string is too short or too long!") on complaintView.submitDate | ||
WorkflowElement Test { | ||
defaultProcessChain MyProcessChain | ||
onInit { | ||
action CustomAction init{ | ||
} | ||
} | ||
|
||
processChain MyProcessChain { | ||
step MediaCapturing: | ||
view myView | ||
} | ||
|
||
action CustomAction assignValidators { | ||
bind validators NotNullValidator (message "ID must not be null!") NumberRangeValidator (message "ID must between 1 and 666!") on complaintView.complaintID | ||
bind validator StringRangeValidator (maxLength 150, minLength 1, message "the string is too short or too long!") on complaintView.descriptionTxt | ||
bind validator RegExValidator (regEx "[A-Za-Z]+@[a-z]{2,6}", message "that's not a valid email address") on complaintView.userEmail | ||
bind validator DateRangeValidator (min 1900-01-01, message "the string is too short or too long!") on complaintView.submitDate | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters