-
-
Notifications
You must be signed in to change notification settings - Fork 440
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What is the problem this feature would solve?
Assume we have the following schema
const User = Schema.Struct({
id: Schema.TemplateLiteral("user_", Schema.String),
})But what is desirable is instead
const User = Schema.Struct({
id: Schema.TemplateLiteral("user_", Schema.NonEmptyString),
})What is the feature you are proposing to solve the problem?
Is there a particular reason why NonEmptyString doesn't work with TemplateLiteral?
Otherwise, this would be an easy task for me to start contributing.
What alternatives have you considered?
A workaround I just thought of, but haven't tried yet, would be:
const User = Schema.Struct({
id: Schema.TemplateLiteral("user_", Schema.String.pipe(Schema.minLength(1)),
})Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request