Category "laravel-validation"

Customizing Laravel validation JSON message format - Laravel

I'm trying to figure out how to customize the Form requests to validate By default Laravel gives a good enough JSON format for validation errors but what if we

is there any way to validate a field that sometime is File(image) && sometime is String(Src of same image)

my problem : i am using laravel framework php i want validate a field witch my field sometime is File(image) and sometime is String(src of same image) is there

Required field only if another field has a value, must be empty otherwise

My question is about Laravel validation rules. I have two inputs a and b. a is a select input with three possible values: x, y and z. I want to write this rule

Best way to shorten store method in controller

I'm trying to shorten my controller code, and I want to know the conventions to use with Laravel while validating and storing. Controller public function store(

Laravel validation only allow one value for each field

I currently have a validation for sortField but I checked this accepts /api/request?sortField='date'&sortField='time' and I want it to only accept one value

Integer or String for a phone number?

I want to know if I have to use a string or an integer for a phone number? I have tried an integer but I have a problem in my validation. ... table->integ

How to override the message of the custom validation rule in Laravel?

I am developing a Laravel application. What I am doing in my application is that I am trying to override the custom validation rule message. I have validation

How to override the message of the custom validation rule in Laravel?

I am developing a Laravel application. What I am doing in my application is that I am trying to override the custom validation rule message. I have validation