k.yr
k.yr•16mo ago

v.record no longer a validator 1.3 -> 1.5

Hello 👋 I've just upgraded from 1.3 to 1.5.1 and I previously had a validator that was parameters: v.record(v.string(), v.any()), Which is now throwing an error as v.record() is not a validator. Is there an alternative for this? Also I was looking into the release notes (may have missed something) and I can only see mentions of potentially supporting v.record and no mentions of it's implementation/removal 😅
4 Replies
Michal Srb
Michal Srb•16mo ago
Hey @k.yr, the validator is work-in-progress but it might have slipped into a release accidentally. We suggest v.array(v.object({key: ..., value: ...})) instead for now
k.yr
k.yrOP•16mo ago
No worries, thanks for that 🙂
charlie
charlie•16mo ago
Came here to ask when record types will be released, saw this post! @Michal Srb is there a release date for this feature?
Michal Srb
Michal Srb•16mo ago
hey @charlie, not yet.

Did you find this page helpful?