Malaysia (my)

Forms

class localflavor.my.forms.MyKadFormField(*, max_length=None, min_length=None, strip=True, empty_value='', **kwargs)[source]

A form field that validates input as a Malaysia MyKad number.

Conforms to the YYMMDD-PB-###G or YYMMDDPB###G format More info: https://en.wikipedia.org/wiki/Malaysian_identity_card

New in version 3.0.

clean(value)[source]

Validate the given value and return its “cleaned” value as an appropriate Python object. Raise ValidationError for any errors.

to_python(value)[source]

Return a string.