PostalAddress.js
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* global console */
define(
[
'ofbiz/model/Base',
'ofbiz/model/ContactMech',
],
function(
Base,
ContactMech
) {
'use strict';
console.log('ofbiz/model/PostalAddress: loaded');
return ContactMech.extend({
defaults: {
address1: null,
city: null,
postalCode: null,
},
validation: {
address1: [
{
required: Base.createRequiredValidator('ofbiz/model/PostalAddress.address1'),
maxLength: 255
}
],
city: [
{
required: Base.createRequiredValidator('ofbiz/model/PostalAddress.city'),
maxLength: 100
}
],
postalCode: [
{
required: Base.createRequiredValidator('ofbiz/model/PostalAddress.postalCode'),
maxLength: 5
}
],
}
});
}
);