2 from exceptions
import ValidationException
4 def _validate_interface_or_name(value
):
5 elements
= value
.split('.')
7 raise ValidationException("%s must contain at least two elements seperated by a period ('.')"%(value))
9 validate
= re
.compile('[A-Za-z][\w_]*')
10 for element
in elements
:
11 if not validate
.match(element
):
12 raise ValidationException("Element %s of %s has invalid characters"%(element
,value
))