def validate_publicname(username):
 if (len(username) < 3):
  return 'Public name must be at least 3 characters in length'
 if (len(username) > 255):
  return 'Public name cannot be more than 255 characters in length'
 if (not VALID_PUBLICNAME_RE.match(username)):
  return "Public name must contain only lower-case letters, numbers and '-'"
 return ''

def validate_publicname ( username ) : if ( len ( username ) < 3 ) : return 'Public name must be at least 3 characters in length' if ( len ( username ) > 255 ) : return 'Public name cannot be more than 255 characters in length' if ( not VALID_PUBLICNAME_RE . match ( username ) ) : return "Public name must contain only lower-case letters, numbers and '-'" return ''
validates the public username .