This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """custom validator to enforce naming convention for site.""" | |
| from nautobot.extras.plugins import PluginCustomValidator | |
| class SiteCustomValidator(PluginCustomValidator): | |
| """ | |
| Custom validator to enforce naming convention for site. | |
| Example of a PluginCustomValidator that checks if the name of a Site object. | |
| contains an invalid characters and if so, raises a ValidationError. |