Commit 7d2bf3424e59b25b52e620211d467712f64cba07

Authored by Paul Barrett
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
plugins/ktcore/KTDocumentActions.php
... ... @@ -697,6 +697,7 @@ class KTDocumentCheckInAction extends KTDocumentAction {
697 697 $aValidators = array(
698 698 array('ktcore.validators.string', array(
699 699 'test' => 'reason',
  700 + 'min_length' => 1,
700 701 'max_length' => 250,
701 702 'output' => 'reason',
702 703 )),
... ... @@ -907,6 +908,7 @@ class KTDocumentCancelCheckOutAction extends KTDocumentAction {
907 908  
908 909 $validators[] = array('ktcore.validators.string', array(
909 910 'test' => 'reason',
  911 + 'min_length' => 1,
910 912 'max_length' => 250,
911 913 'output' => 'reason',
912 914 ));
... ... @@ -1063,6 +1065,7 @@ class KTDocumentDeleteAction extends KTDocumentAction {
1063 1065  
1064 1066 $validators[] = array('ktcore.validators.string', array(
1065 1067 'test' => 'reason',
  1068 + 'min_length' => 1,
1066 1069 'max_length' => 250,
1067 1070 'output' => 'reason',
1068 1071 ));
... ... @@ -1232,6 +1235,7 @@ class KTDocumentMoveAction extends KTDocumentAction {
1232 1235  
1233 1236 $validators[] = array('ktcore.validators.string', array(
1234 1237 'test' => 'reason',
  1238 + 'min_length' => 1,
1235 1239 'max_length' => 250,
1236 1240 'output' => 'reason',
1237 1241 ));
... ... @@ -1466,6 +1470,7 @@ class KTDocumentCopyAction extends KTDocumentAction {
1466 1470 $validators = array();
1467 1471 $validators[] = array('ktcore.validators.string', array(
1468 1472 'test' => 'reason',
  1473 + 'min_length' => 1,
1469 1474 'max_length' => 250,
1470 1475 'output' => 'reason',
1471 1476 ));
... ... @@ -1676,6 +1681,7 @@ class KTDocumentArchiveAction extends KTDocumentAction {
1676 1681  
1677 1682 $validators[] = array('ktcore.validators.string', array(
1678 1683 'test' => 'reason',
  1684 + 'min_length' => 1,
1679 1685 'max_length' => 250,
1680 1686 'output' => 'reason',
1681 1687 ));
... ... @@ -1943,6 +1949,7 @@ class KTDocumentWorkflowAction extends KTDocumentAction {
1943 1949 $oForm->setValidators(array(
1944 1950 array('ktcore.validators.string', array(
1945 1951 'test' => 'reason',
  1952 + 'min_length' => 1,
1946 1953 'max_length' => 250,
1947 1954 'output' => 'reason',
1948 1955 )),
... ...