• 2456 views
  • 0 comments
  • loading...

Allows only alphanumeric characters and non-repeated dashes

Allows only alphanumeric characters and non-repeated dashes.


requires = IS_SLUG(maxlen=80, check=False, error_message='must be slug')


Attributes / Arguments

If check is set to True it check whether the validated value is a slug (allowing only alphanumeric characters and non-repeated dashes).

If check is set to False (default) it converts the input value to a slug.

Displays error message

requires = IS_SLUG(error_message='must be slug')

Specifies maxim lenght of the slug

requires = IS_SLUG(maxlen=80)


Examples

loading...

Sources / Reference

" Web2py Book"


Comments

loading...

Powered by
Web2py

Hosted on
www.pythonanywhere.com
(affiliated link)