public function setMinLength(string $elementName, int $minLength, string $errorMessage = null): \IvoPetkov\BearFrameworkAddons\Form\Constraints
    {
        if ($errorMessage === null) {
            $errorMessage = sprintf(__('ivopetkov.form.The length of this field must be atleast %s characters.'), $minLength);
        }
        $this->data[] = ['minLength', $errorMessage, $elementName, $minLength];
        return $this;
    }
public function setMinLength(string $elementName, int $minLength, string $errorMessage = null): \IvoPetkov\BearFrameworkAddons\Form\Constraints
    {
        if ($errorMessage === null) {
            $errorMessage = sprintf(__('ivopetkov.form.The length of this field must be atleast %s characters.'), $minLength);
        }
        $this->data[] = ['minLength', $errorMessage, $elementName, $minLength];
        return $this;
    }
public function setMinLength ( string $ elementName , int $ minLength , string $ errorMessage = null ) : \ IvoPetkov \ BearFrameworkAddons \ Form \ Constraints { if ( $ errorMessage === null ) { $ errorMessage = sprintf ( __ ( 'ivopetkov.form.The length of this field must be atleast %s characters.' ) , $ minLength ) ; } $ this -> data [ ] = [ 'minLength' , $ errorMessage , $ elementName , $ minLength ] ; return $ this ; }
Sets a minimum length requirement for an element

@param string $elementName The element name
@param int $minLength
@param string $errorMessage Error message
@return \IvoPetkov\BearFrameworkAddons\Form\Constraints Returns a reference to itself.
Sets a minimum length requirement for an element