diff --git a/code/Model/EditableFormField/EditableNumericField.php b/code/Model/EditableFormField/EditableNumericField.php index 9916db9..2190d12 100755 --- a/code/Model/EditableFormField/EditableNumericField.php +++ b/code/Model/EditableFormField/EditableNumericField.php @@ -82,4 +82,12 @@ class EditableNumericField extends EditableFormField $field->setAttribute('data-rule-max', $this->MaxValue); } } + public function validate() + { + $result = parent::validate(); + if ($this->MinValue > $this->MaxValue) { + $result->addError("Minimum length should be less than the Maximum length."); + } + return $result; + } }