PHP 인터페이스 Fuel\Validation\ResultInterface

부터: 2.0
저자: Fuel Development Team
파일 보기 프로젝트 열기: fuelphp/validation 0 사용 예제들

공개 메소드들

메소드 설명
getError ( string $field ) : string Gets an error message for the given field. Will return null if there is no message.
getErrors ( ) : string[] Returns a list of all validation errors.
getFailedRules ( ) : Fuel\Validation\RuleInterface[] Returns a list of rules that caused fields to fail, indexed by the field name.
getValidated ( ) : string[] Returns a list of fields that where successfully validated.
isValid ( ) : boolean True if the validation passed
merge ( Fuel\Validation\ResultInterface $resultInterface, string $fieldPrefix = '' ) Merges the result from the given interface to this result.
setError ( string $field, string $message, string $rule ) Sets the message for a given field.
setResult ( boolean $isValid ) Sets a true false flag for if the validation result is successful or not.
setValidated ( string $field ) Sets the name of a field that has passed validation

메소드 상세

getError() 공개 메소드

Gets an error message for the given field. Will return null if there is no message.
부터: 2.0
public getError ( string $field ) : string
$field string
리턴 string

getErrors() 공개 메소드

Returns a list of all validation errors.
부터: 2.0
public getErrors ( ) : string[]
리턴 string[]

getFailedRules() 공개 메소드

Returns a list of rules that caused fields to fail, indexed by the field name.
부터: 2.0
public getFailedRules ( ) : Fuel\Validation\RuleInterface[]
리턴 Fuel\Validation\RuleInterface[]

getValidated() 공개 메소드

Returns a list of fields that where successfully validated.
부터: 2.0
public getValidated ( ) : string[]
리턴 string[]

isValid() 공개 메소드

True if the validation passed
부터: 2.0
public isValid ( ) : boolean
리턴 boolean

merge() 공개 메소드

Merges the result from the given interface to this result.
public merge ( Fuel\Validation\ResultInterface $resultInterface, string $fieldPrefix = '' )
$resultInterface Fuel\Validation\ResultInterface
$fieldPrefix string Prefix to be added to any field names.

setError() 공개 메소드

Sets the message for a given field.
부터: 2.0
public setError ( string $field, string $message, string $rule )
$field string
$message string
$rule string

setResult() 공개 메소드

Sets a true false flag for if the validation result is successful or not.
부터: 2.0
public setResult ( boolean $isValid )
$isValid boolean

setValidated() 공개 메소드

Sets the name of a field that has passed validation
부터: 2.0
public setValidated ( string $field )
$field string