With stock Flatty using a subrange type will ignore ranges on parse resulting in invalid values.
import flatty
type MyType = object
a: 0..3
var str = 10.toFlatty()
echo str.fromFlatty(MyType) # Expect a Flatty exception that the value is not in the range, instead of working.