Chasen Le Hara
Chasen Le Hara
For reference, here’s where this question was asked and @jeroencornelissen & @ivospinheiro helpfully provided a workaround: https://gitter.im/canjs/canjs?at=59bfa1b5cfeed2eb652288b1
@imaustink I assigned this to you to figure out if @nlundquist’s recommendations cover your needs, or if this is a bug that needs to be fixed.
I’m not sure that throwing an error is a bug (an error of some sort seems useful). It would be nice to change the error to something more understandable though.
We should link to those docs on at least the front pages of [can-define](https://canjs.com/doc/can-define.html), [can-define/list/list](https://canjs.com/doc/can-define/list/list.html), and [can-define/map/map](https://canjs.com/doc/can-define/map/map.html). We should also look for anywhere else we mention “definition” and link to...
Some other ideas: - `checkType`: default to `false` - `convertType`: default to `true` I think it’s nice to have “type” in the name so it’s clear it corresponds with the...
That’s an interesting idea… running with that, maybe something `convertTo: "number"`? My only concern would be if both `type` and `convertTo` are provided: of course we can throw an error...
I think @Macrofig’s [can-validate](https://github.com/canjs/can-validate) can help; it doesn’t have the exact API that you’re looking for @Sinjhin, but it might fit your use case. Thoughts?