StudentStoreRequest
class StudentStoreRequest extends FormRequest (View source)
Handles validation for storing a new student record.
Performs:
- Field sanitization and normalization before validation.
- Custom validation for CPF, email, and phone uniqueness (using hashed values).
- Validation of structured fields like course, term, and period.
Methods
Determine if the user is authorized to make this request.
Define validation rules for creating a student.
Get custom error messages for failed validation rules.
Prepare and sanitize input data before validation.
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 creating a student.
array
messages()
Get custom error messages for failed validation rules.
protected void
prepareForValidation()
Prepare and sanitize input data before validation.
Removes non-numeric characters from CPF, phone, and period fields, trims whitespace from text fields, and normalizes input casing.
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.