skip to Main Content

Drupal – Add Validation example

Rule name: checkYear
Column: value
PHP code:

 if ($this->value <= intval(Date('Y'))) {
 $this->set_error();
 }

Custom error message: The accepted value for year must be ….

see example: http://www.youtube.com/watch?v=OeHdcBFk2Os
at 47:30

This Post Has 0 Comments

Leave a Reply

Back To Top