trait ValidateableData

Methods

static Arrayable|array
validate(Arrayable|array $payload)

Validate a payload without casting or construction.

validateAndCreate(Arrayable|array $payload)

Validate a payload and create the data object.

static void
withValidator(Validator $validator)

Configure the Validator used for the data object.

static array
getValidationRules(array $payload)

Get validation rules for a payload.

static array
rules(ValidationContext $context = 'null')

No description

static array
messages(mixed ...$args)

No description

static array
attributes(mixed ...$args)

No description

static bool
stopOnFirstFailure()

No description

static string
redirect()

No description

static string
redirectRoute()

No description

static string
errorBag()

No description

Details

at line 25
static Arrayable|array validate(Arrayable|array $payload)

Validate a payload without casting or construction.

Parameters

Arrayable|array $payload

Return Value

Arrayable|array

at line 33
static ValidateableData validateAndCreate(Arrayable|array $payload)

Validate a payload and create the data object.

Parameters

Arrayable|array $payload

Return Value

ValidateableData

at line 41
static void withValidator(Validator $validator)

Configure the Validator used for the data object.

Parameters

Validator $validator

Return Value

void

at line 48
static array getValidationRules(array $payload)

Get validation rules for a payload.

Parameters

array $payload

Return Value

array

at line 20
static array rules(ValidationContext $context = 'null')

No description

Parameters

ValidationContext $context

Return Value

array

at line 20
static array messages(mixed ...$args)

No description

Parameters

mixed ...$args

Return Value

array

at line 20
static array attributes(mixed ...$args)

No description

Parameters

mixed ...$args

Return Value

array

at line 20
static bool stopOnFirstFailure()

No description

Return Value

bool

at line 20
static string redirect()

No description

Return Value

string

at line 20
static string redirectRoute()

No description

Return Value

string

at line 20
static string errorBag()

No description

Return Value

string