-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
We want to add a .locale("fieldname") method on s.object which set the field which defines the locale of an object. It will be used together with s.locale():
s.object({ title: s.string(), lang: s.locale("en_us", "fr_fr") }).locale("lang") // "lang" could be anything...Full example will be something like this:
const schema = s.object({ title: s.string(), lang: s.locale("en_us", "fr_fr") }).locale("lang")
export default c.define("/test.val.ts", schema, {
title: "hello",
lang: "en_us"
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo