poppinss / indicative

Indicative is a simple yet powerful data validator for Node.js and browsers. It makes it so simple to write async validations on nested set of data.
https://indicative.adonisjs.com/
MIT License
417 stars 52 forks source link

Problem with to_int #131

Closed andmagom closed 7 years ago

andmagom commented 7 years ago

Indicative is normally used for validation and sanitize request, but to_int sanitazion is failing for strings like '2017a1', it's return 2017, but in some times, We need a NaN, becuase It's may be a error typing.

I'll send a PR with the posible solution.

My PR'll fail because eslint is failing. But, You can view the code and feedback me.