I was looking how to create a site setting that validates a username, but found there’s a
username type to do this. Here the list of site setting types we have today:
Also, you can do custom validations for your plugin settings, it accepts a
validator field that expects a Ruby class. You use it like this.
You can check the UsernameSettingValidator class to see the interface of validators.