from django import forms
from testapp.models import student
class studentregistration(forms.ModelForm):
    class Meta:
        model = student
        fields = "__all__"
    
    def clean(self):
        cleaned_data =  super().clean()
        name = cleaned_data['name']
        if len(name)<4:
            raise forms.ValidationError("Name must contains atleast 4 character")
        
bc478a3d88cf37048b7d4902ea7ccd1642e89cc2
<mask token>

<mask token>


class studentregistration(forms.ModelForm):


    class Meta:
        model = student
        fields = '__all__'
    <mask token>

<mask token>


class studentregistration(forms.ModelForm):


    class Meta:
        model = student
        fields = '__all__'

    def clean(self):
        cleaned_data = super().clean()
        name = cleaned_data['name']
        if len(name) < 4:
            raise forms.ValidationError(
                'Name must contains atleast 4 character')

from django import forms
from testapp.models import student


class studentregistration(forms.ModelForm):


    class Meta:
        model = student
        fields = '__all__'

    def clean(self):
        cleaned_data = super().clean()
        name = cleaned_data['name']
        if len(name) < 4:
            raise forms.ValidationError(
                'Name must contains atleast 4 character')

from django import forms
from testapp.models import student
class studentregistration(forms.ModelForm):
    class Meta:
        model = student
        fields = "__all__"
    
    def clean(self):
        cleaned_data =  super().clean()
        name = cleaned_data['name']
        if len(name)<4:
            raise forms.ValidationError("Name must contains atleast 4 character")
        