Guest User

Untitled

a guest
Jul 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <?php
  2.  
  3. function get_validation_rules($mode = '', $group = '') {
  4. return array (
  5. 'id' => array (
  6. 'digit'
  7. ),
  8. 'name' => array (
  9. 'required',
  10. 'length' => '1,40',
  11. 'callback' => array('Site_Controller', 'valid_unique_name')
  12. ),
  13. 'formattedDomain' => array (
  14. 'required',
  15. 'length' => '1,40'
  16. ),
  17. 'siteName' => array (
  18. 'required',
  19. 'length' => '1,255'
  20. ),
  21. 'infoEmail' => array (
  22. 'required',
  23. 'email',
  24. 'length' => '0,64'
  25. ),
  26. 'salesEmail' => array (
  27. 'required',
  28. 'email',
  29. 'length' => '0,64'
  30. ),
  31. 'addr1' => array (
  32. 'required',
  33. 'length' => '1,64'
  34. ),
  35. 'addr2' => array (
  36. 'length' => '0,64'
  37. ),
  38. 'city' => array (
  39. 'required',
  40. 'length' => '0,40'
  41. ),
  42. 'state' => array (
  43. 'required',
  44. 'length' => '2'
  45. ),
  46. 'zipCode' => array (
  47. 'required',
  48. 'length' => '5,10'
  49. ),
  50. 'phone' => array (
  51. 'required',
  52. 'phone',
  53. 'length' => '1,12'
  54. ),
  55. 'metaKeywords' => array (
  56. 'length' => '0,255'
  57. ),
  58. 'metaDescription' => array (
  59. 'length' => '0,255'
  60. )
  61. );
  62. }
  63. ?>
Add Comment
Please, Sign In to add comment