diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f13187..d1e958b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/react/rules/NLD.js b/react/rules/NLD.js new file mode 100644 index 0000000..1684448 --- /dev/null +++ b/react/rules/NLD.js @@ -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', + }, + ], +}