protected function getFieldsWithValidationRules($fieldsConfig)
    {
        return $fieldsConfig->filter(function ($value) {
            if (empty($value->details)) {
                return false;
            }

            return !empty($value->details->validation->rule);
        });
    }
protected function getFieldsWithValidationRules($fieldsConfig)
    {
        return $fieldsConfig->filter(function ($value) {
            if (empty($value->details)) {
                return false;
            }

            return !empty($value->details->validation->rule);
        });
    }
protected function getFieldsWithValidationRules ( $ fieldsConfig ) { return $ fieldsConfig -> filter ( function ( $ value ) { if ( empty ( $ value -> details ) ) { return false ; } return ! empty ( $ value -> details -> validation -> rule ) ; } ) ; }
Get fields having validation rules in proper format.

@param array $fieldsConfig

@return \Illuminate\Support\Collection
Get fields having validation rules in proper format .