I make this:
public function rules()
{
return array(
array('id, tipologiaStrutturaId, clienteId', 'numerical', 'integerOnly'=>true),
array('email', 'CEmailValidator' ),
array('numeroStelle', 'in', 'range'=> range( 1, 5), 'message' => 'E' necessario scegliere un numero di stelle'),
array('tipologiaStrutturaId', 'CNumberValidator', 'min'=> 1, 'message' => 'E' necessario scegliere una tipologia'),
array('sitoWeb', 'CUrlValidator' ),
//array('password', 'compare', 'compareAttribute'=>'password2'),
);
}
But when I try some wrong value for tipologiaStrutturaId it reports:
Quote
Tipologia Struttura è troppo piccolo (il minimo è 1).
It's translated in italian ok, but you can easily see that it's different from my error message defined in the model.
Someone know why?