Edit this page

URL Field

Stores a String in the model. Displayed as a text field in the Admin UI. This field does not validate input before saving, and will not reject data that is not a url.

  { type: Types.Url }



Defaults to removeProtocolPrefix. Strips any protocol from the value using the regular expression ^[a-zA-Z]+\:\/\/ and returns a string.



You can override the default formatter by providing a method as the format option on the field, or disable it by setting the format option to false.

  item.url = "http://keystonejs.com";
  item._.url.format(); // "keystonejs.com"

Inherits from Text

  • addFilterToQuery
  • validateInput
  • validateRequiredInput


Uses the same logic and filter UI as the Text field type.