EIN
Validate US Employer Identification Numbers.
Validates that a value is a US Employer Identification Number (EIN). Both the dashed and plain digit forms are accepted.
| Config flag | Type | Description |
|---|
ein | boolean | When true, requires the value to be a valid US EIN. |
const form = useForm({
initialValues: { ein: '' },
validationSchema: {
ein: { ein: true },
},
});
import { V } from 'formify-js';
V.ein();
| Scenario | Message |
|---|
| Value is not a valid EIN | Must be a valid Employer Identification Number |
| Value | Result |
|---|
'12-3456789' | ✅ Valid |
'123456789' | ✅ Valid |
'12-345678' | ❌ Invalid (too short) |
'123-45-6789' | ❌ Invalid (wrong shape) |
- The
XX-XXXXXXX shape is enforced — with or without the dash.
- Useful for business registration forms alongside the SSN validator.