Changed regex while validating column name
This commit is contained in:
parent
a2d23027a6
commit
8bc26b856d
1 changed files with 1 additions and 1 deletions
|
|
@ -387,7 +387,7 @@ class DbManager:
|
|||
def validate_column_name(n):
|
||||
n = n.replace(' ','_').strip().lower()
|
||||
import re
|
||||
if not re.match("[a-zA-Z_][a-zA-Z0-9_]*$", n):
|
||||
if re.search("[\W]", n):
|
||||
webnotes.msgprint('err:%s is not a valid fieldname.<br>A valid name must contain letters / numbers / spaces.<br><b>Tip: </b>You can change the Label after the fieldname has been set' % n)
|
||||
raise Exception
|
||||
return n
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue