RegexValidator(r'^159[0-9]+$', '數(shù)字必須以159開頭') ] ) 性別校驗(yàn) 1 2 3 4 5 6 gender = forms.ChoiceField( choices=((1, "男"), (2, "女"), (3, "保密")), label="性別", initial=3, widget=forms.widgets.RadioSelect() ) 愛好單選 select校驗(yàn) 1 2 3 4 5 6 hobby = forms...
www.dbjr.com.cn/article/1783...htm 2025-5-17