Django regex validator message has no effect

后端 未结 4 1019
不思量自难忘°
不思量自难忘° 2020-12-31 04:48

I am trying to get it so that the validator tells you \"username must be alphanumeric\". This is my code so far. I have confirmed that it validates at the correct time. The

4条回答
  •  误落风尘
    2020-12-31 05:05

    a validate user name here should contain at least one minuscule letter, one capital letter and one numeric, if i understand your code.
    to complete Virendra Rajput answer correct the regex with that:
    regex=r'^[a-zA-Z0-9]*$'   start with the r'
    

提交回复
热议问题