Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

#2616 boolean validation - #2704

Merged
BE-Webdesign merged 4 commits into
WP-API:developfrom
BE-Webdesign:#2616-boolean-validation
Sep 17, 2016
Merged

BE-Webdesign merged 4 commits into
WP-API:developfrom
BE-Webdesign:#2616-boolean-validation

Conversation

@BE-Webdesign

@BE-Webdesign BE-Webdesign commented Sep 15, 2016 •

Copy link
Copy Markdown
Member

Fixes #2616, and #2633, In addition #2630 can be closed. Adds boolean validation/sanitization, to handle integers, strings, and booleans. 'false' and '0' and integer 0 will evaluate to false. The opposite of those values is true.

@codecov-io

codecov-io commented Sep 15, 2016 •

Copy link
Copy Markdown

Current coverage is 94.32% (diff: 95.23%)

Merging #2704 into develop will increase coverage by <.01%

@@            develop      #2704   diff @@
==========================================
  Files            11         11          
  Lines          3648       3667    +19   
  Methods         173        173          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           3441       3459    +18   
- Misses          207        208     +1   
  Partials          0          0          

Powered by Codecov. Last update 0e5e8db...d67dd84

@kadamwhite kadamwhite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, all cases I can think of for the boolean parameter validation look to be covered and the rest_is_bool method seems to be doing its job. Provisionally approving.

@BE-Webdesign
BE-Webdesign merged commit 93ca44e into WP-API:develop Sep 17, 2016
@BE-Webdesign

Copy link
Copy Markdown
Member Author

I merged it because it was approved by both of you and somehow you couldn't merge it, the button worked for me so I just clicked it, hopefully that is not bad form.

@kadamwhite

Copy link
Copy Markdown
Contributor

@BE-Webdesign No that's great; thanks for taking the initiative. I hope that "approve PR" doesn't mean "only the submitter can merge"; that would be counterintuitive.

@danielbachhuber danielbachhuber modified the milestone: 2.0 Beta 14 Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Boolean request args fail validation

5 participants