public function rules()
    {
        $this->buildForm();

        $this->extendForm();
        
        $rules = [];

        foreach ($this->fields() as $field) {
            if (!is_null($field->getRules())) {
                $rules[$field->getName()] = $field->getRules();
            }
        }

        return $rules;
    }