Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BolProp and FlagProp should have explicit values for False #658

Closed
eeverman opened this issue Oct 19, 2021 · 1 comment
Closed

BolProp and FlagProp should have explicit values for False #658

eeverman opened this issue Oct 19, 2021 · 1 comment

Comments

@eeverman
Copy link
Owner

eeverman commented Oct 19, 2021

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.

@eeverman eeverman added this to the 0.5.0 milestone Oct 19, 2021
@eeverman eeverman changed the title BolProp should be explicit for False values BolProp should have explicit values for False Oct 19, 2021
@eeverman eeverman changed the title BolProp should have explicit values for False BolProp and FlagProp should have explicit values for False Sep 29, 2022
@eeverman
Copy link
Owner Author

Fixed in #729

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

No branches or pull requests

1 participant