UserStoreRequest
class UserStoreRequest extends FormRequest (View source)
Handles validation logic for creating a new user.
This request ensures that the provided name, email, and password comply with structural, uniqueness, and formatting rules before being persisted to the database.
Methods
Determine if the user is authorized to make this request.
Define validation rules for the user creation request.
Custom error messages for validation failures.
Prepare input data before applying validation rules.
Retrieve an input item from the request.
Merge new input into the request's data.
Details
bool
authorize()
Determine if the user is authorized to make this request.
array
rules()
Define validation rules for the user creation request.
array
messages()
Custom error messages for validation failures.
protected void
prepareForValidation()
Prepare input data before applying validation rules.
This method trims text fields and ensures consistent formatting for email and password inputs to prevent false negatives during validation.
mixed
input(string $key, mixed $default = null)
Retrieve an input item from the request.
void
merge(array $input)
Merge new input into the request's data.