ValidatorDtd.php 366 B

1234567891011121314151617181920212223
  1. <?php
  2. class LtValidatorDtd
  3. {
  4. public $label;
  5. public $rules;
  6. public $messages;
  7. public function __construct($label, $rules, $messages = null)
  8. {
  9. $this->label = $label;
  10. foreach($rules as $key => $rule)
  11. {
  12. $this->rules[$key] = $rule;
  13. }
  14. if ($messages)
  15. {
  16. foreach($messages as $key => $message)
  17. {
  18. $this->messages[$key] = $message;
  19. }
  20. }
  21. }
  22. }