MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / check_dom_name_value

Function check_dom_name_value

pywebio/utils.py:378–384  ·  view source on GitHub ↗

check the class name / id name of DOM element

(value, name='`name`')

Source from the content-addressed store, hash-verified

376
377
378def check_dom_name_value(value, name='`name`'):
379 """check the class name / id name of DOM element"""
380 allowed_chars = set(string.ascii_letters + string.digits + '_-')
381
382 if not all(i in allowed_chars for i in value):
383 raise ValueError(name + " can only contain letters, digits, "
384 "hyphens ('-') and underscore ('_')")

Callers 15

_parse_argsFunction · 0.85
set_scopeFunction · 0.85
put_progressbarFunction · 0.85
set_progressbarFunction · 0.85
put_scopeFunction · 0.85
use_scopeFunction · 0.85
put_inputFunction · 0.85
put_textareaFunction · 0.85
put_selectFunction · 0.85
put_checkboxFunction · 0.85
put_radioFunction · 0.85
put_sliderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…