encode / apistar

The Web API toolkit. 🛠
https://docs.apistar.com
BSD 3-Clause "New" or "Revised" License
5.57k stars 411 forks source link

Why don't allow convert string to number? #605

Closed songww closed 5 years ago

songww commented 6 years ago

TestCase will failed if validator is number type and a string value given.

tomchristie commented 5 years ago

TypeSystem now handles all the validtion aspects https://github.com/encode/typesystem And, yes it'll allow coercion from string types to numbers or whatever, unless you use .validate(value, strict=True)