Closed
Description
I'm trying to create a field that accepts either an ip address or a url,
const Schema = object({
address: union([
pipe(string(), trim(), minLength(1, "Address is required"), ip()),
pipe(string(), trim(), minLength(1, "Address is required"), url()),
]),
});
when validating i get a strange error:
Uncaught ValiError: Invalid type: Expected string but received "test"
You can see this live here