private Optional<ValidationEvent> validateRangeProperty(
            Model model,
            Shape shape,
            RangeTrait trait,
            BigDecimal property,
            String name
    ) {
        if (!property.remainder(BigDecimal.ONE).equals(BigDecimal.ZERO)) {
            if (shape.isMemberShape()) {
                MemberShape member = shape.asMemberShape().get();
                Optional<Shape> target = model.getShape(member.getTarget());
                if (target.isPresent() && !isDecimalShape(target.get())) {
                    return Optional.of(error(shape,
                            trait,
                            format(
                                    "Member `%s` is marked with the `range` trait, but its `%s` property "
                                            + "is a decimal (%s) when its target (`%s`) does not support decimals.",
                                    shape.getId(),
                                    name,
                                    property,
                                    target.get().getId())));
                }
            } else if (!isDecimalShape(shape)) {
                return Optional.of(error(shape,
                        trait,
                        format(
                                "Shape `%s` is marked with the `range` trait, but its `%s` property "
                                        + "is a decimal (%s) when its shape (`%s`) does not support decimals.",
                                shape.getId(),
                                name,
                                property,
                                shape.getType())));
            }
        }
        return Optional.empty();
    }
Ensures that range traits are valid.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/RangeTraitValidator.java