web services - Validate webservice parameters -


i'm quite new codeigniter kindly me through..

i'm writing restful web service codeigniter - there way validate parameters in 'post' request's json?

by validating, mean kind of form_validation json parameters , not form (well obviously, there no form in use.)

example post body:

{"name":"foo","email":"foo@gmail.com"} 

if regular form post (not json), i'd use:

$this->form_validation->set_rules('name', 'name', required | max_length[30]) $this->form_validation->set_rules('email', 'email', required | valid_email) 

how can implement in case?

10x


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -