Skip to content

When numeric range restriction is too narrow a type for field type unhelpful errors are issued #120

Description

@rvesse

Discovered from $day job testing. When using a numeric range restriction eg IntegerRange on a field with a wider type eg long what looks like a valid value can be rejected with an unhelpful error:

Value for option 'MaxIdleTime' was given as '2' which is not in the acceptable range: value >= 1

This is because while the range restriction implementation copes with widening casts eg LongRange on an int field it doesn't cope with the inverse.

Implementation should be improved to issue a more specific error in this case since this is an option definition error

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions