Skip to content

Commit

Permalink
Add Netherlands rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sheilagomes committed Sep 11, 2024
1 parent 91afa90 commit a712c7c
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- Netherlands ('NLD') country rules.

## [2.20.4] - 2024-06-04

### Added
Expand Down
72 changes: 72 additions & 0 deletions react/rules/NLD.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import msk from 'msk'
import { isPastDate } from '../utils/dateRules'

export default {
country: 'NLD',
personalFields: [
{
name: 'firstName',
maxLength: 100,
label: 'firstName',
required: true,
},
{
name: 'lastName',
maxLength: 100,
label: 'lastName',
required: true,
},
{
name: 'email',
maxLength: 100,
label: 'email',
hidden: true,
},
{
name: 'document',
maxLength: 50,
label: 'document',
required: false,
},
{
name: 'homePhone',
maxLength: 30,
label: 'homePhone',
},
{
name: 'gender',
maxLength: 30,
label: 'gender',
},
{
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
mask: (value) => msk.fit(value, '99.99.9999'),
},
],
businessFields: [
{
name: 'corporateName',
maxLength: 100,
label: 'corporateName',
},
{
name: 'tradeName',
maxLength: 100,
label: 'tradeName',
},
{
name: 'corporateDocument',
maxLength: 30,
label: 'corporateDocument',
},
{
name: 'businessPhone',
maxLength: 30,
label: 'businessPhone',
},
],
}

0 comments on commit a712c7c

Please sign in to comment.