diff --git a/progit/hooks/irc.py b/progit/hooks/irc.py
index ec1b0c4..706bac0 100644
--- a/progit/hooks/irc.py
+++ b/progit/hooks/irc.py
@@ -16,7 +16,7 @@ import wtforms
from flask.ext import wtf
from sqlalchemy.orm import relation
-from progit.hooks import BaseHook
+from progit.hooks import BaseHook, RequiredIf
from progit.lib.model import BASE, Project
from progit import SESSION, APP, get_repo_path
@@ -55,15 +55,15 @@ class IrcForm(wtf.Form):
''' Form to configure the irc hook. '''
server = wtforms.TextField(
'Server *',
- [wtforms.validators.Required()]
+ [RequiredIf('active')]
)
port = wtforms.TextField(
'Port *',
- [wtforms.validators.Required()]
+ [RequiredIf('active')]
)
room = wtforms.TextField(
'Room *',
- [wtforms.validators.Required()]
+ [RequiredIf('active')]
)
nick = wtforms.TextField(
'Nick',