Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
# /app/Model/Article.php
class Article extends AppModel
{
public $hasMany = array(
'Comment'
);
public $validate = array(
'title' => array(
'rule' => array('notEmpty'),
'required' => true,
'allowEmpty' => false,
'message' => 'inserire un titolo'
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.