Validation Regex is not applied to URL Custom Fields #11688

Closed
opened 2025-12-29 21:48:38 +01:00 by adam · 0 comments
Owner

Originally created by @ypid on GitHub (Oct 4, 2025).

Originally assigned to: @jnovinger on GitHub.

NetBox Edition

NetBox Community

NetBox Version

v4.4.2

Python Version

3.10

Steps to Reproduce

  1. Create custom field, apply it to Device Types in Object types, set name to "url", set Type to URL and Validation regex ^https://
  2. Enter "http://sdfsdf" in the "url" field of a Device Type and press Save.

I only found this old related issue: #5558

According to the Custom Fields docs, Validation regex should work for URL which is string-based.

Expected Behavior

Save rejected with error: "Values must match this regex: ^https://" like it works for Custom Fields with "String" Type.

Observed Behavior

Device Type is saved regardless of Validation regex.

Originally created by @ypid on GitHub (Oct 4, 2025). Originally assigned to: @jnovinger on GitHub. ### NetBox Edition NetBox Community ### NetBox Version v4.4.2 ### Python Version 3.10 ### Steps to Reproduce 1. Create custom field, apply it to Device Types in Object types, set name to "url", set Type to URL and Validation regex `^https://` 2. Enter "http://sdfsdf" in the "url" field of a Device Type and press Save. I only found this old related issue: #5558 According to [the Custom Fields docs](https://netboxlabs.com/docs/netbox/models/extras/customfield/#validation-regex), Validation regex should work for URL which is string-based. ### Expected Behavior Save rejected with error: "Values must match this regex: ^https://" like it works for Custom Fields with "String" Type. ### Observed Behavior Device Type is saved regardless of Validation regex.
adam added the type: bugstatus: acceptednetboxseverity: low labels 2025-12-29 21:48:38 +01:00
adam closed this issue 2025-12-29 21:48:38 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11688