---
title: stateConstraint
framework: coreml
role: symbol
role_heading: Instance Property
path: coreml/mlfeaturedescription/stateconstraint
---

# stateConstraint

The state feature value constraint.

## Declaration

```swift
var stateConstraint: MLStateConstraint? { get }
```

## Discussion

Discussion The property has a value when .type == MLFeatureTypeState.

## See Also

### Accessing feature constraints

- [imageConstraint](coreml/mlfeaturedescription/imageconstraint.md)
- [MLImageConstraint](coreml/mlimageconstraint.md)
- [dictionaryConstraint](coreml/mlfeaturedescription/dictionaryconstraint.md)
- [MLDictionaryConstraint](coreml/mldictionaryconstraint.md)
- [multiArrayConstraint](coreml/mlfeaturedescription/multiarrayconstraint.md)
- [MLMultiArrayConstraint](coreml/mlmultiarrayconstraint.md)
- [sequenceConstraint](coreml/mlfeaturedescription/sequenceconstraint.md)
- [MLSequenceConstraint](coreml/mlsequenceconstraint.md)
