Skip to content

Commit

Permalink
Merge pull request #92 from vtex/fix/rulesITA
Browse files Browse the repository at this point in the history
Added specific rules for ITA
  • Loading branch information
salesfelipe authored Jan 6, 2021
2 parents 92c528c + 723e298 commit d7ac942
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

- Specific rules for `ITA`.

## [2.7.3] - 2020-10-14

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

export default {
country: 'ITA',
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,
hidden: true,
},
{
name: 'homePhone',
maxLength: 30,
label: 'homePhone',
},
{
name: 'gender',
maxLength: 30,
label: 'gender',
},
{
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},
],
businessFields: [
{
name: 'corporateName',
maxLength: 100,
label: 'corporateName',
},
{
name: 'tradeName',
maxLength: 100,
label: 'tradeName',
},
{
name: 'corporateDocument',
maxLength: 30,
label: 'corporateDocument',
required: false,
},
{
name: 'businessPhone',
maxLength: 30,
label: 'businessPhone',
},
],
}

0 comments on commit d7ac942

Please sign in to comment.