PHP 클래스 ZenValidatorConstraint, silverstripe-zenvalidator

저자: ([email protected])
상속: extends Object
파일 보기 프로젝트 열기: sheadawson/silverstripe-zenvalidator 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$customMessage string
$field FormField
$parsleyApplied boolean

공개 메소드들

메소드 설명
applyParsley ( ) : void Sets the html attributes required for frontend validation Subclasses should call parent::applyParsley
getConstraintName ( ) : string Gets the name of this constraint from it's classname which should correspond to the string that parsley uses to identify a constraint type
getDefaultMessage ( ) : string Return the default message for this constraint
getField ( ) : FormField
getMessage ( ) : string Get's the message that was set on the constrctor or falls back to default
loadExtra ( string $name ) Load extra validator
removeParsley ( ) : void Removes the html attributes required for frontend validation Subclasses should call parent::removeParsley
setField ( FormField $field ) : this Set the field this constraint is applied to
setMessage ( string $message ) : this Set a custom message for this constraint
validate ( $value ) : boolean Performs php validation on the value

메소드 상세

applyParsley() 공개 메소드

Sets the html attributes required for frontend validation Subclasses should call parent::applyParsley
public applyParsley ( ) : void
리턴 void

getConstraintName() 공개 메소드

Gets the name of this constraint from it's classname which should correspond to the string that parsley uses to identify a constraint type
public getConstraintName ( ) : string
리턴 string

getDefaultMessage() 추상적인 공개 메소드

Return the default message for this constraint
abstract public getDefaultMessage ( ) : string
리턴 string

getField() 공개 메소드

public getField ( ) : FormField
리턴 FormField

getMessage() 공개 메소드

Get's the message that was set on the constrctor or falls back to default
public getMessage ( ) : string
리턴 string

loadExtra() 공개 메소드

Load extra validator
public loadExtra ( string $name )
$name string

removeParsley() 공개 메소드

Removes the html attributes required for frontend validation Subclasses should call parent::removeParsley
public removeParsley ( ) : void
리턴 void

setField() 공개 메소드

Set the field this constraint is applied to
public setField ( FormField $field ) : this
$field FormField
리턴 this

setMessage() 공개 메소드

Set a custom message for this constraint
public setMessage ( string $message ) : this
$message string
리턴 this

validate() 추상적인 공개 메소드

Performs php validation on the value
abstract public validate ( $value ) : boolean
$value
리턴 boolean

프로퍼티 상세

$customMessage 보호되어 있는 프로퍼티

protected string $customMessage
리턴 string

$field 보호되어 있는 프로퍼티

protected FormField $field
리턴 FormField

$parsleyApplied 보호되어 있는 프로퍼티

protected bool $parsleyApplied
리턴 boolean