cancel
Showing results for 
Search instead for 
Did you mean: 

How to validate(server side) form data while using WebApi?

SOLVED

How to validate(server side) form data while using WebApi?

Hi,

I am using Magento 2.3.2

I have a form and  CRUD functionality is done by Magento WebApi.

Form is in under templates folder named Create.phtml

 

Question: How to validate that form in server side? Is there any documentation or example?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to validate(server side) form data while using WebApi?

Hi @mohammad khonda 

 

When the form post you can check the values and validate it.

 

Suppose your form is submitted to abc function.Just go to that abc function and get all the post values and validate it as per your requirement.

 

You can also refer https://magento.stackexchange.com/questions/242505/server-side-validation-in-magento-forms

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".

View solution in original post

1 REPLY 1

Re: How to validate(server side) form data while using WebApi?

Hi @mohammad khonda 

 

When the form post you can check the values and validate it.

 

Suppose your form is submitted to abc function.Just go to that abc function and get all the post values and validate it as per your requirement.

 

You can also refer https://magento.stackexchange.com/questions/242505/server-side-validation-in-magento-forms

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".