Non capisco,
nella tabella mysql ho un campo: fwdrccr
text NOT NULL,
Nel nella funzione rules() del modello mi crea automaticamente il campo fwdrccr come required.
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
//array('alias, fwdrccr', 'required'), // creato automaticamente
array('alias', 'required'), // desiderato ma non funzionante
array('account, tipo', 'length', 'max'=>50),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('id, account, alias, fwdrccr, tipo', 'safe', 'on'=>'search'),
);
}
Se tengo il campo nell’elenco dei ‘required’ funziona tutto ma ovviamente il campo non può essere vuoto.
Se elimino il campo dall’elenco dei ‘required’ (per consentire il campo vuoto) la modifica del campo non funziona più… senza alcuna segnalazione… perchè?
yii Version 1.1.10