> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ploterr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Property rules

> Find elements that do not have a required property.

## Import

```typescript theme={null}
import {
  evaluateRequiredPropertyRule,
  evaluateDoorFireRatingRule,
  DOOR_FIRE_RATING_REQUIRED,
} from '@opengeometry/floorkit';
```

## evaluateRequiredPropertyRule

Run a named-property requirement against its applicable element type.

```typescript theme={null}
function evaluateRequiredPropertyRule(
  elements: Iterable<PropertyRuleElement>,
  rule: RequiredPropertyRule,
): RequiredPropertyRuleReport;
```

## evaluateDoorFireRatingRule

Run DOOR\_FIRE\_RATING\_REQUIRED against an element collection.

```typescript theme={null}
function evaluateDoorFireRatingRule(
  elements: Iterable<PropertyRuleElement>,
): RequiredPropertyRuleReport;
```

## DOOR\_FIRE\_RATING\_REQUIRED

```typescript theme={null}
const DOOR_FIRE_RATING_REQUIRED: Readonly<RequiredPropertyRule>;
```

## Types

### PropertyRuleElement

A minimal element view for property-compliance rules.

```typescript theme={null}
interface PropertyRuleElement extends PropertySetCarrier {
  ogid?: string;
  ogType?: string;
  labelName?: string;
}
```

<ResponseField name="ogid" type="string">
  Stable result identifier, normally a Floorkit `ogid`.
</ResponseField>

<ResponseField name="ogType" type="string">
  Floorkit element discriminator, for example `DOOR`.
</ResponseField>

<ResponseField name="labelName" type="string" />

### RequiredPropertyRule

A declarative requirement for one named scalar property.

```typescript theme={null}
interface RequiredPropertyRule {
  id: string;
  name: string;
  ogType: string;
  propertySet: string;
  property: string;
}
```

### RequiredPropertyRuleReport

A stable, UI-ready summary of one rule run.

```typescript theme={null}
interface RequiredPropertyRuleReport {
  rule: RequiredPropertyRule;
  inScope: number;
  passed: number;
  failed: number;
  passRate: number | null;
  items: RequiredPropertyRuleItem[];
}
```

<ResponseField name="rule" type="RequiredPropertyRule" required />

<ResponseField name="inScope" type="number" required />

<ResponseField name="passed" type="number" required />

<ResponseField name="failed" type="number" required />

<ResponseField name="passRate" type="number | null" required>
  Percentage in \[0, 100], or null when no elements matched the rule scope.
</ResponseField>

<ResponseField name="items" type="RequiredPropertyRuleItem[]" required />

### RequiredPropertyRuleItem

One element evaluated by a required-property rule.

```typescript theme={null}
interface RequiredPropertyRuleItem {
  elementId?: string;
  elementName?: string;
  value?: PropertyValue;
  status: 'pass' | 'fail';
  reason?: 'missing-property-set' | 'missing-property' | 'blank-value';
}
```

<ResponseField name="elementId" type="string" />

<ResponseField name="elementName" type="string" />

<ResponseField name="value" type="PropertyValue" />

<ResponseField name="status" type="'pass' | 'fail'" required />

<ResponseField name="reason" type="'missing-property-set' | 'missing-property' | 'blank-value'">
  Present only for failures, so a host application can explain the repair.
</ResponseField>

## Related

* [`PropertySetCarrier`](/floorkit/api/architecture/property-sets#propertysetcarrier)
* [`PropertyValue`](/floorkit/api/architecture/op-element#propertyvalue)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.