Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
# /app/Model/Order.php
class Order extends AppModel {
public $hasAndBelongsToMany = array('Region');
public $validate = array(
'company' => array(
'rule' => array('notEmpty'),
'required' => true,
'message' => 'inserire un nome azienda'
),
'email' => array(
'rule' => 'email',
'required' => true,
'message' => 'inserire un indirizzo email valido'
),
'Region' => array(
'rule' => array('multiple', array('min' => 1)),
'required' => true,
'message' => 'selezionare almeno una regione'
)
);
}
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.