\Fuman_Validate_StringLength

Checks if string length is valid

Summary

Methods
Properties
Constants
setErrorColumnName()
getErrorColumnName()
isValid()
getErrorCode()
hasErrorCode()
setTranslationKey()
getMessage()
__construct()
No public properties found
INVALID
TO_LONG
TO_SHORT
No protected methods found
$_errorCode
$_errorArguments
$_errorColumnName
$_translationKeys
$_min
$_max
N/A
No private methods found
No private properties found
N/A

Constants

INVALID

INVALID

Error code invalid

TO_LONG

TO_LONG

Error code to much

TO_SHORT

TO_SHORT

Error code to less

Properties

$_errorCode

$_errorCode : string

Type

string

$_errorArguments

$_errorArguments : \stdClass

Type

\stdClass

$_errorColumnName

$_errorColumnName : 

Type

$_translationKeys

$_translationKeys : 

Type

$_min

$_min : integer

Type

integer

$_max

$_max : integer

Type

integer

Methods

setErrorColumnName()

setErrorColumnName(string  $errorColumnName) 

Sets the column name on which the validation error should be added

Parameters

string $errorColumnName

getErrorColumnName()

getErrorColumnName() : null|string

Gets the column name on which the validation error should be added

Returns

null|string

isValid()

isValid(string  $value) : boolean

Is valid

Parameters

string $value

Returns

boolean

getErrorCode()

getErrorCode() : integer|null

Gets error code

Returns

integer|null

hasErrorCode()

hasErrorCode() : boolean

Has error code.

Returns

boolean

setTranslationKey()

setTranslationKey(string  $errorCode, string  $key) 

Sets translations key for error code

Parameters

string $errorCode
string $key

getMessage()

getMessage() : string

Gets message

Returns

string

__construct()

__construct(boolean  $min = false, boolean  $max = false) 

Constructor

Parameters

boolean $min
boolean $max