How can i validate the date that i insert???
I should control if the date that i insert not is bigger the the today date…
Can i use the validator of framework "in" with a range???
Can you help me???
How can i validate the date that i insert???
I should control if the date that i insert not is bigger the the today date…
Can i use the validator of framework "in" with a range???
Can you help me???
[edit final]
NOT WORK, Sorry
compare string
[s]maybe with
CCompareValidator
and the operator property[/s]
public function rules()
{
return array(
array('xxxxx','compare','compareValue'=>$this->today,'operator'=>'<='),
);
}
[edit]
i probe and work
public function rules()
{
return array(
array('xxxxx','compare','compareValue'=>date('d/m/Y'),'operator'=>'<='),
);
}
[s]but with
new CDbExpression(‘NOW()’)
not work[/s]