fork download
  1. def my_validate(value):
  2. if len(value) < 1 or len(value) > 256:
  3. print(valeu + " Must be between 1-255")
  4. if any(not l.isalnum() and l not in ['_', '/'] for l in value):
  5. print(value + " Must be all alphanumeric or contain _ or /")
  6.  
  7.  
  8. my_validate("sd434_/")
  9. my_validate("sd434_/()")
Success #stdin #stdout 0.02s 9132KB
stdin
Standard input is empty
stdout
sd434_/() Must be all alphanumeric or contain _ or /