How to validate mandatory post parameters in an codeingter rest API

Checking for mandatory post parameters in codeingter API

In this tutorial we are going to how to validate requests in codeigniter rest server or how to check mandatory parameters in an API

In API developemnt we cant able to check every mandatory fields seperatly,it may take multiple if else condtions,and we need to bind error message seperatly.

This below function is very useful to validate mandatory parameters in an codeingter rest API.

Intially we need to define required parameters.Need to pass the required parameters with post values and it gets compared and returns the missing parameters.

If any issue comment below.Happy Coding..

Add a Comment

Your email address will not be published. Required fields are marked *