Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
ofbiz-backbone-models
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
07c70cdf
authored
2014-12-16 22:20:09 +0200
by
Andreyev Oleg
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add maxLenght validation rule to the ofbiz model objects
1 parent
72c41d09
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
7 deletions
src/scripts/ofbiz/model/EmailAddress.js
src/scripts/ofbiz/model/PartyGroup.js
src/scripts/ofbiz/model/Person.js
src/scripts/ofbiz/model/PostalAddress.js
src/scripts/ofbiz/model/TelecomNumber.js
src/scripts/ofbiz/model/EmailAddress.js
View file @
07c70cd
...
...
@@ -21,6 +21,7 @@ define(
{
pattern
:
'email'
,
required
:
Base
.
createRequiredChecker
(
'ofbiz/model/EmailAddress.emailAddress'
),
maxLength
:
255
},
]
},
...
...
src/scripts/ofbiz/model/PartyGroup.js
View file @
07c70cd
...
...
@@ -16,7 +16,10 @@ define(
},
validation
:
{
groupName
:
[
Base
.
createRequiredValidator
(
'ofbiz/model/PartyGroup.groupName'
),
{
required
:
Base
.
createRequiredValidator
(
'ofbiz/model/PartyGroup.groupName'
),
maxLength
:
100
}
],
},
});
...
...
src/scripts/ofbiz/model/Person.js
View file @
07c70cd
...
...
@@ -17,10 +17,16 @@ define(
},
validation
:
{
firstName
:
[
Base
.
createRequiredValidator
(
'ofbiz/model/Person.firstName'
),
{
required
:
Base
.
createRequiredValidator
(
'ofbiz/model/Person.firstName'
),
maxLength
:
100
}
],
lastName
:
[
Base
.
createRequiredValidator
(
'ofbiz/model/Person.lastName'
),
{
required
:
Base
.
createRequiredValidator
(
'ofbiz/model/Person.lastName'
),
maxLength
:
100
}
],
},
});
...
...
src/scripts/ofbiz/model/PostalAddress.js
View file @
07c70cd
...
...
@@ -18,13 +18,22 @@ define(
},
validation
:
{
address1
:
[
Base
.
createRequiredValidator
(
'ofbiz/model/PostalAddress.address1'
),
{
required
:
Base
.
createRequiredValidator
(
'ofbiz/model/PostalAddress.address1'
),
maxLength
:
255
}
],
city
:
[
Base
.
createRequiredValidator
(
'ofbiz/model/PostalAddress.city'
),
{
required
:
Base
.
createRequiredValidator
(
'ofbiz/model/PostalAddress.city'
),
maxLength
:
100
}
],
postalCode
:
[
Base
.
createRequiredValidator
(
'ofbiz/model/PostalAddress.postalCode'
),
{
required
:
Base
.
createRequiredValidator
(
'ofbiz/model/PostalAddress.postalCode'
),
maxLength
:
5
}
],
}
});
...
...
src/scripts/ofbiz/model/TelecomNumber.js
View file @
07c70cd
...
...
@@ -16,7 +16,10 @@ define(
},
validation
:
{
contactNumber
:
[
Base
.
createRequiredValidator
(
'ofbiz/model/TelecomNumber.contactNumber'
),
{
required
:
Base
.
createRequiredValidator
(
'ofbiz/model/TelecomNumber.contactNumber'
),
maxLength
:
60
}
]
}
});
...
...
Please
register
or
sign in
to post a comment