public function rules() { return [ ['property', 'string', 'max' => 10, 'tooLong' => 'Error message'] ]; }