Skip to main content

A small and quick validation plugin for CPF or CNPJ in django rest framework!

Project description

Examples:

from rest_framework import serializers
from drf_cpf_cnpj_validator.validadors import cpf_validator, cnpj_validator


class PersonSerializer(serializers.ModelSerializer):
    cpf = serializers.Charfield(validators=[cpf_validator])


class CompanySerializer(serializers.ModelSerializer):
    cnpj = serializers.Charfield(validators=[cnpj_validator])

Translations:

This plugin translate the messages from your LANGUAGE_CODE , located in settings.py.

  • Enabled translations:

  • en-US

  • pt-BR

  • es-ES

Project details


Release history Release notifications | RSS feed

This version

1.6

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf_cpf_cnpj_validator-1.6.tar.gz (2.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page