<?php
class Post extends AppModel
{
        var $name = 'Post';
        var $hasAndBelongsToMany = 'Tag';

        var $actual_year = date('Y');

        $validate = array
        (
            'year' => array
            (
                'required' => true,
                'rule' => array('range', 1899, $actual_year),
                'message' => 'Insert a number between 1899 and '.
$actual_year
            )
        );
}
?>

But I get a stupid error on line 7: Parse error: syntax error,
unexpected '(', expecting ',' or ';' in /Applications/MAMP/htdocs/
cakephp/app/models/album.php on line 7

Why?
Parse error: syntax error, unexpected '(', expecting ',' or ';' in /
Applications/MAMP/htdocs/cakephp/app/models/album.php on line 7

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to