src/traits/PropertiesTrait.php
public function propertiesRules()
    {
        $rules = [];
        $this->ensurePropertiesAttributes();

        if (empty($this->propertiesIds) === false) {
            foreach ($this->propertiesIds as $propertyId) {
                /** @var Property $property */
                $property = Property::findById($propertyId);
                $handler = $property->handler();

                $rules = ArrayHelper::merge($rules, $handler->getValidationRules($property));
                if ($property->isRequired()) {
                    $rules = ArrayHelper::merge($rules, [[$property->key, 'required']]);
                }
            }
        }
        return $rules;
    }
public function propertiesRules()
    {
        $rules = [];
        $this->ensurePropertiesAttributes();

        if (empty($this->propertiesIds) === false) {
            foreach ($this->propertiesIds as $propertyId) {
                /** @var Property $property */
                $property = Property::findById($propertyId);
                $handler = $property->handler();

                $rules = ArrayHelper::merge($rules, $handler->getValidationRules($property));
                if ($property->isRequired()) {
                    $rules = ArrayHelper::merge($rules, [[$property->key, 'required']]);
                }
            }
        }
        return $rules;
    }
public function propertiesRules ( ) { $ rules = [ ] ; $ this -> ensurePropertiesAttributes ( ) ; if ( empty ( $ this -> propertiesIds ) === false ) { foreach ( $ this -> propertiesIds as $ propertyId ) { /** @var Property $property */ $ property = Property :: findById ( $ propertyId ) ; $ handler = $ property -> handler ( ) ; $ rules = ArrayHelper :: merge ( $ rules , $ handler -> getValidationRules ( $ property ) ) ; if ( $ property -> isRequired ( ) ) { $ rules = ArrayHelper :: merge ( $ rules , [ [ $ property -> key , 'required' ] ] ) ; } } } return $ rules ; }
Array of validation rules for properties

@return array
Array of validation rules for properties