<?php
App::uses('AppModel', 'Model');
class Invoice extends AppModel {
public $validate = array(
'description' => array(
'notBlank' => array(
'rule' => array('notBlank'),
'message' => 'Please enter description.',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'amount' => array(
'numeric' => array(
'rule' => array('numeric'),
'message' => 'Please enter valid amount.',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
)
);
public $belongsTo = array(
'Applicant' => array(
'className' => 'Applicant',
'foreignKey' => 'applicant_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}