PHP 인터페이스 Esensi\Model\Contracts\ValidatingModelInterface

또한 보기: Watson\Validating\ValidatingInterface
사용 중단: In watson/[email protected] the custom methods used below were deprecated in favor of Laravel 5's form request validation classes. Stop using rulesets right now as they will be removed.
저자: Daniel LaBarge ([email protected])
상속: extends Watson\Validating\ValidatingInterface
파일 보기 프로젝트 열기: esensi/model

공개 메소드들

메소드 설명
addRules ( array $rules, string $ruleset = null ) Add rules to the existing rules or ruleset, overriding any existing.
getDefaultRules ( ) : array Get the default ruleset for any event. Will first search to see if a 'saving' ruleset exists, fallback to '$rules' and otherwise return an empty array.
getRuleset ( string $ruleset, boolean $mergeWithSaving = false ) : array Get a ruleset, and merge it with saving if required.
getRulesets ( ) : array Get all the rulesets.
isInvalid ( mixed $ruleset = null, boolean $mergeWithSaving = true ) : boolean Returns whether the model is invalid or not.
isValid ( mixed $ruleset = null, boolean $mergeWithSaving = true ) : boolean Returns whether the model is valid or not.
isValidOrFail ( string $ruleset = null ) : boolean Returns if the model is valid, otherwise throws an exception.
mergeRulesets ( array $keys ) : array Helper method to merge rulesets, with later rules overwriting earlier ones.
removeRules ( mixed $keys, string $ruleset = null ) Remove rules from the existing rules or ruleset.
setRuleset ( array $rules, string $ruleset ) Set the rules used for a particular ruleset.
setRulesets ( array $rulesets = null ) Set all the rulesets.
updateRulesetUniques ( string $ruleset = null ) Update the unique rules of the given ruleset to include the model identifier.

메소드 상세

addRules() 공개 메소드

Add rules to the existing rules or ruleset, overriding any existing.
사용 중단: watson/[email protected]
public addRules ( array $rules, string $ruleset = null )
$rules array
$ruleset string

getDefaultRules() 공개 메소드

Get the default ruleset for any event. Will first search to see if a 'saving' ruleset exists, fallback to '$rules' and otherwise return an empty array.
사용 중단: watson/[email protected]
public getDefaultRules ( ) : array
리턴 array

getRuleset() 공개 메소드

Get a ruleset, and merge it with saving if required.
사용 중단: watson/[email protected]
public getRuleset ( string $ruleset, boolean $mergeWithSaving = false ) : array
$ruleset string
$mergeWithSaving boolean
리턴 array

getRulesets() 공개 메소드

Get all the rulesets.
사용 중단: watson/[email protected]
public getRulesets ( ) : array
리턴 array

isInvalid() 공개 메소드

Returns whether the model is invalid or not.
public isInvalid ( mixed $ruleset = null, boolean $mergeWithSaving = true ) : boolean
$ruleset mixed (@deprecated watson/[email protected])
$mergeWithSaving boolean (@deprecated watson/[email protected])
리턴 boolean

isValid() 공개 메소드

Returns whether the model is valid or not.
public isValid ( mixed $ruleset = null, boolean $mergeWithSaving = true ) : boolean
$ruleset mixed (@deprecated watson/[email protected])
$mergeWithSaving boolean (@deprecated watson/[email protected])
리턴 boolean

isValidOrFail() 공개 메소드

Returns if the model is valid, otherwise throws an exception.
public isValidOrFail ( string $ruleset = null ) : boolean
$ruleset string (@deprecated watson/[email protected])
리턴 boolean

mergeRulesets() 공개 메소드

Helper method to merge rulesets, with later rules overwriting earlier ones.
사용 중단: watson/[email protected]
public mergeRulesets ( array $keys ) : array
$keys array
리턴 array

removeRules() 공개 메소드

Remove rules from the existing rules or ruleset.
사용 중단: watson/[email protected]
public removeRules ( mixed $keys, string $ruleset = null )
$keys mixed
$ruleset string

setRuleset() 공개 메소드

Set the rules used for a particular ruleset.
사용 중단: watson/[email protected]
public setRuleset ( array $rules, string $ruleset )
$rules array
$ruleset string

setRulesets() 공개 메소드

Set all the rulesets.
사용 중단: watson/[email protected]
public setRulesets ( array $rulesets = null )
$rulesets array

updateRulesetUniques() 공개 메소드

Update the unique rules of the given ruleset to include the model identifier.
사용 중단: watson/[email protected]
public updateRulesetUniques ( string $ruleset = null )
$ruleset string