+
Skip to content

BolProp and FlagProp should have explicit values for False #658

@eeverman

Description

@eeverman

The BolProp and FlagProp both currently compare a set value against a list of known true values (e.g. 'true', 'yes', 'on', etc.). All other values are considered false.

Thus, values like Yess, Truly, Truee, etc., are all be considered false without any sort of error or warning. This breaks the basic contract of AndHow, which is strong typing and validation.

Describe the solution you'd like
There should be a explicit list of false values so that validation is meaningful for boolean values. the list can be the converse of the 'true' list.

The logic for this should be moved into the BolType and not delegate to the TextUtil. TextUtil provides some basic text utilities, but the logic of how Strings are turned into values should really be in the Type classes.

Note: This is a behavior change and should be noted in the release notes and docs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载