PHP 클래스 Fuel\Validation\Result

부터: 2.0
저자: Fuel Development Team
상속: implements Fuel\Validation\ResultInterface
파일 보기 프로젝트 열기: fuelphp/validation 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$errors string[] Contains an array of errors that occurred during validation
$failedRules Fuel\Validation\RuleInterface[] Contains the rule that caused a given field to fail
$result boolean Boolean flag to indicate overall failure or success
$validated string[] Contains a list of fields that passed validation

공개 메소드들

메소드 설명
getError ( string $field ) : string
getErrors ( ) : string[]
getFailedRules ( ) : Fuel\Validation\RuleInterface[] Returns a list of rules that caused fields to fail, indexed by the field name.
getValidated ( ) : string[]
isValid ( ) : boolean
merge ( Fuel\Validation\ResultInterface $resultInterface, $fieldPrefix = '' )
setError ( string $field, string $message, string $rule ) Sets the error message for the given field
setResult ( boolean $isValid )
setValidated ( string $field )

메소드 상세

getError() 공개 메소드

부터: 2.0
public getError ( string $field ) : string
$field string
리턴 string

getErrors() 공개 메소드

부터: 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() 공개 메소드

부터: 2.0
public getValidated ( ) : string[]
리턴 string[]

isValid() 공개 메소드

부터: 2.0
public isValid ( ) : boolean
리턴 boolean

merge() 공개 메소드

public merge ( Fuel\Validation\ResultInterface $resultInterface, $fieldPrefix = '' )
$resultInterface Fuel\Validation\ResultInterface

setError() 공개 메소드

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

setResult() 공개 메소드

부터: 2.0
public setResult ( boolean $isValid )
$isValid boolean

setValidated() 공개 메소드

부터: 2.0
public setValidated ( string $field )
$field string

프로퍼티 상세

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

Contains an array of errors that occurred during validation
protected string[] $errors
리턴 string[]

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

Contains the rule that caused a given field to fail
protected RuleInterface[],Fuel\Validation $failedRules
리턴 Fuel\Validation\RuleInterface[]

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

Boolean flag to indicate overall failure or success
protected bool $result
리턴 boolean

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

Contains a list of fields that passed validation
protected string[] $validated
리턴 string[]