Skip to main content

CUIT / CUIL

cuitCuil is a native DYONA field for Argentine CUIT/CUIL values. The consumer declares the field; DYONA handles visual formatting, normalization, and structural validation.

{
name: 'cuit',
label: 'CUIT / CUIL',
type: 'cuitCuil',
required: true,
}

Visual format and stored value​

The mask is presentation only. DYONA displays:

30 71094360 1

The form state and submit value remain a string of eleven digits, without spaces or hyphens:

'30710943601'

The field accepts typing and pasted values with digits, spaces, or hyphens. It automatically keeps only the first eleven digits, while the input continues to show XX XXXXXXXX X.

Validation​

An optional empty cuitCuil field is valid. When required: true, it uses the standard DYONA required validation.

When a value exists, DYONA validates that it has exactly eleven digits and that its CUIT/CUIL verifier digit is structurally valid. This is not an ARCA lookup: it does not verify existence, fiscal status, or ownership.

Additional declared validations continue to run alongside the native validation. Backend fieldErrors work like they do for every other DyonaForm field.

Initial values and submit​

Use the normalized value in initialValues; DYONA renders it with the visual format and submits the normalized string.

import {DyonaForm, type DyonaFormSchema} from '@typhonsoftware/dyona-form';

const schema: DyonaFormSchema = {
title: 'Tax identification',
hideSingleTab: true,
actions: {submit: {label: 'Save'}},
tabs: [{id: 'identification', title: 'Identification', rows: [{columns: [
{name: 'cuit', label: 'CUIT / CUIL', type: 'cuitCuil', required: true},
]}]}],
};

<DyonaForm
schema={schema}
initialValues={{cuit: '30710943601'}}
onSubmit={(values) => console.log(values)}
/>;

The same normalization also makes an initial or pasted value such as 30-71094360-1 become 30710943601 in the form value.

Try CUIT / CUIL in the Lab