summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/host.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugins/host.py')
-rw-r--r--ipalib/plugins/host.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 01a8240e..52907eeb 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -247,6 +247,9 @@ class host(LDAPObject):
takes_params = (
Str('fqdn', validate_host,
+ pattern='^[a-zA-Z0-9][a-zA-Z0-9-\.]{0,254}$',
+ pattern_errmsg='may only include letters, numbers, and -',
+ maxlength=255,
cli_name='hostname',
label=_('Host name'),
primary_key=True,