Validation in ZF1

For programming and general questions on Zend Framework

Validation in ZF1

Postby rosh9277 on Thu Jun 15, 2017 8:35 am

I have injected a service layer in Zend Framework 1 project. The project also has REST API for android and other devices. My project layout looks like this

Code: Select all
Application
modules
      default
         controller
             CustomerController.php [for web]
      api
         controllers
              CustomerController.php [for android device]
services
   CustomerService.php

While CustomerService.php class handles all customer creation logic and is consumed by CustomerController.php in both api and default module. Its easy to validate the values submitted by users in web using form. How can I validate the values submitted by users in service so that there is no code repetition in both front and api controllers for validation?
rosh9277
 
Posts: 1
Joined: Thu Jun 15, 2017 8:34 am

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 5 guests

cron