Skip to content

Commit

Permalink
Merge pull request #196 from vtex/add/nld-rules
Browse files Browse the repository at this point in the history
Add Netherlands rules
  • Loading branch information
sheilagomes authored Sep 18, 2024
2 parents 91afa90 + a712c7c commit fcd5207
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 fcd5207

Please sign in to comment.