PageRenderTime 40ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/constraint/max.php

https://bitbucket.org/oligriffiths/com_validation
PHP | 21 lines | 14 code | 2 blank | 5 comment | 0 complexity | ef3cc699d59963090fc3474977df62f1 MD5 | raw file
  1. <?php
  2. /**
  3. * Created By: Oli Griffiths
  4. * Date: 11/12/2012
  5. * Time: 12:16
  6. */
  7. namespace Nooku\Component\Validation;
  8. use Nooku\Library;
  9. class ConstraintMax extends ConstraintDefault
  10. {
  11. protected function _initialize(Library\ObjectConfig $config)
  12. {
  13. $config->append(array(
  14. 'max' => null,
  15. 'message' => '{{ target }} should be {{ max }} or less, "{{ value }}" given'
  16. ));
  17. parent::_initialize($config);
  18. }
  19. }