From the form fields on the site, information always comes in the form of text, even if I indicate in the model
public function rules() { return [ [['field'], 'integer'], ]; } type conversion occurs only if done like this:
public function behaviors() { 'typecast' => [ 'class' => AttributeTypecastBehavior::className(), 'attributeTypes' => [ 'field' => AttributeTypecastBehavior::TYPE_INTEGER, ], 'typecastAfterValidate' => true, 'typecastBeforeSave' => false, 'typecastAfterFind' => false, } so it should be, or am I doing something wrong? According to my logic, specifying in rules the type of system should lead field to type INTEGER, and also save in the database, but not, saves as text!