Validate string is URL

What would be the easiest way to validate that the url in here is an actual valid url?
const button = type({
  label: "2<=string<=32",
  url: "2<=string<=512",
})
Was this page helpful?