$comment = new Model_Comment();
$comment->post = new Model_Post();
$comment->save();
$comment = new Model_Comment();
$comment->date = date('Y-m-d');
$comment->save();
}public static function validate($factory) {
$val = Validation::forge($factory);
$val->add_field('date', 'Date', 'required|valid_date'); //I wish know this, but for validating relatin models.
return $val;
It looks like you're new here. If you want to get involved, click one of these buttons!