If you use Doctrine and want to make validation with Zend Framework. This tutorial is for you.
- Create a TestTable.Yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
- Build the Doctrine_Record with doctrine.php build-all comment then we get the record
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
- In our controller we use the Kebab_Validation_DoctrineTable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
- The output is
1 2 3 4 5 6 7 8 9 10 11 | |
You can find the code on github at kebab-project.com repos. https://github.com/kebab-project/kebab-project/blob/master/library/Kebab/Validate/DoctrineTable.php
Bugs and feedback are always welcome.
Best regards.