Create a gist now

Instantly share code, notes, and snippets.

$this->request->data['Link'] = array(
'owner_id' => 1,
'LFrom' => 2138,//
'LTo' => $this->last_id,
'quant' => 1,
'created' => date("Y-m-d H:i:s"),
'modified' => date("Y-m-d H:i:s"),
);
$this->Link->create();
if ($this->Link->save($this->request->data)) {
Validation was false it works.
'created' => array(
'datetime' => array(
'rule' => array('datetime'),
//'rule' => array('datetime',"Y-m-d H:i:s"), is wrong
//'message' => 'Your custom message here',
'allowEmpty' => true,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
validation is like this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment