def __init__(self, protocols=None, localhost=False, message=None):
if message is not None:<EOL><INDENT>self.not_email = message<EOL><DEDENT>if protocols:<EOL><INDENT>self.protocols = protocols<EOL><DEDENT>if localhost:<EOL><INDENT>self.localhost = True<EOL><DEDENT>
Initialize validator
Accepts an optional custom error message.

:param protocols:       list, allowed protocols
:param localhost:       bool, wether to allow localhost
:param message:         str, custom error message
:return:                None