mercredi 26 avril 2017

REST API Request parameter validation Laravel

I am new to API with Laravel. I am trying to validate parameters sent into POST request through the Laravel's validate method.

Following data is the only parameter I am sending through the POST request. I want to validate device_id for uniqueness using Laravel's validate method.

data => {"device_id":"xxxxxx2C-9EA3-4FFB-B26D-E8E483xxxxxx","password":"ANVp285x","user_type":"1"} 

I can validate the only data parameter however there is no proper response or error message it's throwing exception. My main motive is to validate device_id, password and user_type.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2oObGr3
via IFTTT

Aucun commentaire:

Enregistrer un commentaire