Skip to content
Advertisement

Tag: validation

required not working

I’am using this code along with php code for a select and used required class to make it mandatory but it is not working. Does anyone can help me.I have included this html section along with php code. Answer Try to remove space value in your select category option

Laravel use Request validation with api

I’m trying to implement validation in my api like this: RideUpdateRequest: So how could I give a error message back in json (if the request validation fails)? Right now in postman I receive nothing back? –EDIT– response: Could I get something like this?: Answer If you take a look at the FormRequest class, you’ll see a response() method defined as

Required_if laravel with multiple value

I have a dropdown menu like this: