0

forms.py

I want to validate white space for following fields name1,name2 and name3.I tried the same in clean(),where i did other validation.Only white space validation is not accepting.

Thanks

user2086641
  • 4,331
  • 13
  • 56
  • 96
Monk L
  • 3,358
  • 9
  • 26
  • 41

1 Answers1

0

Have you thought about using a RegexField, which would only accept the formats (incl whitespace) you want?

See RegexField in the docs

Steve Jalim
  • 11,989
  • 1
  • 37
  • 54