1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #609: Add min/max value and regex validation for custom fields

This commit is contained in:
Jeremy Stretch
2020-10-15 15:06:01 -04:00
parent e7d26ca5dc
commit 8781cf1c57
7 changed files with 135 additions and 7 deletions

View File

@ -108,6 +108,9 @@ class CustomFieldAdmin(admin.ModelAdmin):
'description': 'A custom field must be assigned to one or more object types.',
'fields': ('content_types',)
}),
('Validation Rules', {
'fields': ('validation_minimum', 'validation_maximum', 'validation_regex')
}),
('Choices', {
'description': 'A selection field must have two or more choices assigned to it.',
'fields': ('choices',)