Commit 7d2bf3424e59b25b52e620211d467712f64cba07
1 parent
fe76727a
KTS-3997. Prevent a space character from being accepted as a reason for a docume…
…nt action by adding a minimum length check for various scenarrios which did not already include one 'Reason' input requirement circumvented by a space bar action in a number of scenarios. Fixed Committed By: Paul Barrett Reviewed by: Megan Watson
Showing
1 changed file
with
7 additions
and
0 deletions
plugins/ktcore/KTDocumentActions.php
| @@ -697,6 +697,7 @@ class KTDocumentCheckInAction extends KTDocumentAction { | @@ -697,6 +697,7 @@ class KTDocumentCheckInAction extends KTDocumentAction { | ||
| 697 | $aValidators = array( | 697 | $aValidators = array( |
| 698 | array('ktcore.validators.string', array( | 698 | array('ktcore.validators.string', array( |
| 699 | 'test' => 'reason', | 699 | 'test' => 'reason', |
| 700 | + 'min_length' => 1, | ||
| 700 | 'max_length' => 250, | 701 | 'max_length' => 250, |
| 701 | 'output' => 'reason', | 702 | 'output' => 'reason', |
| 702 | )), | 703 | )), |
| @@ -907,6 +908,7 @@ class KTDocumentCancelCheckOutAction extends KTDocumentAction { | @@ -907,6 +908,7 @@ class KTDocumentCancelCheckOutAction extends KTDocumentAction { | ||
| 907 | 908 | ||
| 908 | $validators[] = array('ktcore.validators.string', array( | 909 | $validators[] = array('ktcore.validators.string', array( |
| 909 | 'test' => 'reason', | 910 | 'test' => 'reason', |
| 911 | + 'min_length' => 1, | ||
| 910 | 'max_length' => 250, | 912 | 'max_length' => 250, |
| 911 | 'output' => 'reason', | 913 | 'output' => 'reason', |
| 912 | )); | 914 | )); |
| @@ -1063,6 +1065,7 @@ class KTDocumentDeleteAction extends KTDocumentAction { | @@ -1063,6 +1065,7 @@ class KTDocumentDeleteAction extends KTDocumentAction { | ||
| 1063 | 1065 | ||
| 1064 | $validators[] = array('ktcore.validators.string', array( | 1066 | $validators[] = array('ktcore.validators.string', array( |
| 1065 | 'test' => 'reason', | 1067 | 'test' => 'reason', |
| 1068 | + 'min_length' => 1, | ||
| 1066 | 'max_length' => 250, | 1069 | 'max_length' => 250, |
| 1067 | 'output' => 'reason', | 1070 | 'output' => 'reason', |
| 1068 | )); | 1071 | )); |
| @@ -1232,6 +1235,7 @@ class KTDocumentMoveAction extends KTDocumentAction { | @@ -1232,6 +1235,7 @@ class KTDocumentMoveAction extends KTDocumentAction { | ||
| 1232 | 1235 | ||
| 1233 | $validators[] = array('ktcore.validators.string', array( | 1236 | $validators[] = array('ktcore.validators.string', array( |
| 1234 | 'test' => 'reason', | 1237 | 'test' => 'reason', |
| 1238 | + 'min_length' => 1, | ||
| 1235 | 'max_length' => 250, | 1239 | 'max_length' => 250, |
| 1236 | 'output' => 'reason', | 1240 | 'output' => 'reason', |
| 1237 | )); | 1241 | )); |
| @@ -1466,6 +1470,7 @@ class KTDocumentCopyAction extends KTDocumentAction { | @@ -1466,6 +1470,7 @@ class KTDocumentCopyAction extends KTDocumentAction { | ||
| 1466 | $validators = array(); | 1470 | $validators = array(); |
| 1467 | $validators[] = array('ktcore.validators.string', array( | 1471 | $validators[] = array('ktcore.validators.string', array( |
| 1468 | 'test' => 'reason', | 1472 | 'test' => 'reason', |
| 1473 | + 'min_length' => 1, | ||
| 1469 | 'max_length' => 250, | 1474 | 'max_length' => 250, |
| 1470 | 'output' => 'reason', | 1475 | 'output' => 'reason', |
| 1471 | )); | 1476 | )); |
| @@ -1676,6 +1681,7 @@ class KTDocumentArchiveAction extends KTDocumentAction { | @@ -1676,6 +1681,7 @@ class KTDocumentArchiveAction extends KTDocumentAction { | ||
| 1676 | 1681 | ||
| 1677 | $validators[] = array('ktcore.validators.string', array( | 1682 | $validators[] = array('ktcore.validators.string', array( |
| 1678 | 'test' => 'reason', | 1683 | 'test' => 'reason', |
| 1684 | + 'min_length' => 1, | ||
| 1679 | 'max_length' => 250, | 1685 | 'max_length' => 250, |
| 1680 | 'output' => 'reason', | 1686 | 'output' => 'reason', |
| 1681 | )); | 1687 | )); |
| @@ -1943,6 +1949,7 @@ class KTDocumentWorkflowAction extends KTDocumentAction { | @@ -1943,6 +1949,7 @@ class KTDocumentWorkflowAction extends KTDocumentAction { | ||
| 1943 | $oForm->setValidators(array( | 1949 | $oForm->setValidators(array( |
| 1944 | array('ktcore.validators.string', array( | 1950 | array('ktcore.validators.string', array( |
| 1945 | 'test' => 'reason', | 1951 | 'test' => 'reason', |
| 1952 | + 'min_length' => 1, | ||
| 1946 | 'max_length' => 250, | 1953 | 'max_length' => 250, |
| 1947 | 'output' => 'reason', | 1954 | 'output' => 'reason', |
| 1948 | )), | 1955 | )), |