diff --git a/codbex-partners/codbex-partners.edm b/codbex-partners/codbex-partners.edm index 1edc952..ee945f4 100644 --- a/codbex-partners/codbex-partners.edm +++ b/codbex-partners/codbex-partners.edm @@ -14,7 +14,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -119,5 +119,5 @@ - + \ No newline at end of file diff --git a/codbex-partners/codbex-partners.gen b/codbex-partners/codbex-partners.gen index 322a7f0..274db5e 100644 --- a/codbex-partners/codbex-partners.gen +++ b/codbex-partners/codbex-partners.gen @@ -561,6 +561,7 @@ "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": true, @@ -575,7 +576,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -1049,6 +1050,7 @@ "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": true, @@ -1063,7 +1065,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -1402,6 +1404,7 @@ "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": true, @@ -1416,7 +1419,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "CREATED_AT", @@ -1727,6 +1730,7 @@ "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": true, @@ -1741,7 +1745,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "CREATED_AT", @@ -2734,6 +2738,7 @@ "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": true, @@ -2748,7 +2753,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "CREATED_AT", @@ -3059,6 +3064,7 @@ "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": true, @@ -3073,7 +3079,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "CREATED_AT", diff --git a/codbex-partners/codbex-partners.model b/codbex-partners/codbex-partners.model index 5c5e5e4..9268238 100644 --- a/codbex-partners/codbex-partners.model +++ b/codbex-partners/codbex-partners.model @@ -222,6 +222,7 @@ "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, @@ -434,6 +435,7 @@ "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, @@ -1057,6 +1059,7 @@ "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, diff --git a/codbex-partners/gen/codbex-partners/api/Customers/CustomerContactController.ts b/codbex-partners/gen/codbex-partners/api/Customers/CustomerContactController.ts index 90a4a7e..6d7c495 100644 --- a/codbex-partners/gen/codbex-partners/api/Customers/CustomerContactController.ts +++ b/codbex-partners/gen/codbex-partners/api/Customers/CustomerContactController.ts @@ -55,7 +55,7 @@ class CustomerContactController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerContactService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerContactController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts b/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts index 9fe7b1e..814fa55 100644 --- a/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts +++ b/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts @@ -44,7 +44,7 @@ class CustomerController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { @@ -224,6 +224,9 @@ class CustomerController { if (entity.IBAN?.length > 34) { throw new ValidationError(`The 'IBAN' exceeds the maximum length of [34] characters`); } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.IBAN)) { + throw new ValidationError(`The value provided for the 'IBAN' property ('[${entity.IBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } if (entity.Identifier === null || entity.Identifier === undefined) { throw new ValidationError(`The 'Identifier' property is required, provide a valid value`); } diff --git a/codbex-partners/gen/codbex-partners/api/Customers/CustomerNoteController.ts b/codbex-partners/gen/codbex-partners/api/Customers/CustomerNoteController.ts index e204891..cad8582 100644 --- a/codbex-partners/gen/codbex-partners/api/Customers/CustomerNoteController.ts +++ b/codbex-partners/gen/codbex-partners/api/Customers/CustomerNoteController.ts @@ -55,7 +55,7 @@ class CustomerNoteController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerNoteService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerNoteController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerContactController.ts b/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerContactController.ts index d287ee7..8be3a53 100644 --- a/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerContactController.ts +++ b/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerContactController.ts @@ -51,7 +51,7 @@ class ManufacturerContactController { try { this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerContactService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerContactController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerController.ts b/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerController.ts index 40119d0..f177a44 100644 --- a/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerController.ts +++ b/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerController.ts @@ -44,7 +44,7 @@ class ManufacturerController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { @@ -206,6 +206,9 @@ class ManufacturerController { if (entity.IBAN?.length > 34) { throw new ValidationError(`The 'IBAN' exceeds the maximum length of [34] characters`); } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.IBAN)) { + throw new ValidationError(`The value provided for the 'IBAN' property ('[${entity.IBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } for (const next of validationModules) { next.validate(entity); } diff --git a/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerNoteController.ts b/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerNoteController.ts index 4d1cbb3..e45ca77 100644 --- a/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerNoteController.ts +++ b/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerNoteController.ts @@ -44,7 +44,7 @@ class ManufacturerNoteController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerNoteService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Manufacturers/ManufacturerNoteController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierContactController.ts b/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierContactController.ts index 3d7e224..4c8a378 100644 --- a/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierContactController.ts +++ b/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierContactController.ts @@ -51,7 +51,7 @@ class SupplierContactController { try { this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierContactService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierContactController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts b/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts index 6a1a489..d7f8f46 100644 --- a/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts +++ b/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts @@ -44,7 +44,7 @@ class SupplierController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { @@ -206,6 +206,9 @@ class SupplierController { if (entity.IBAN?.length > 34) { throw new ValidationError(`The 'IBAN' exceeds the maximum length of [34] characters`); } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.IBAN)) { + throw new ValidationError(`The value provided for the 'IBAN' property ('[${entity.IBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } for (const next of validationModules) { next.validate(entity); } diff --git a/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierNoteController.ts b/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierNoteController.ts index 7c5d45c..ed3c8ea 100644 --- a/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierNoteController.ts +++ b/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierNoteController.ts @@ -55,7 +55,7 @@ class SupplierNoteController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierNoteService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierNoteController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/index.html b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/index.html index 390f62d..83d2710 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/dialog-window/index.html @@ -267,7 +267,7 @@
+ text="{{ 'codbex-partners:codbex-partners-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> diff --git a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html index 6cdb57a..e04f419 100644 --- a/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Customers/Customer/main-details/index.html @@ -273,7 +273,7 @@
+ text="{{ 'codbex-partners:codbex-partners-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> diff --git a/codbex-partners/gen/codbex-partners/ui/Manufacturers/Manufacturer/dialog-window/index.html b/codbex-partners/gen/codbex-partners/ui/Manufacturers/Manufacturer/dialog-window/index.html index a801d51..8bb39ed 100644 --- a/codbex-partners/gen/codbex-partners/ui/Manufacturers/Manufacturer/dialog-window/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Manufacturers/Manufacturer/dialog-window/index.html @@ -191,7 +191,7 @@
+ text="{{ 'codbex-partners:codbex-partners-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> diff --git a/codbex-partners/gen/codbex-partners/ui/Manufacturers/Manufacturer/main-details/index.html b/codbex-partners/gen/codbex-partners/ui/Manufacturers/Manufacturer/main-details/index.html index 301fbd3..1b9f83f 100644 --- a/codbex-partners/gen/codbex-partners/ui/Manufacturers/Manufacturer/main-details/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Manufacturers/Manufacturer/main-details/index.html @@ -189,7 +189,7 @@
+ text="{{ 'codbex-partners:codbex-partners-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> diff --git a/codbex-partners/gen/codbex-partners/ui/Suppliers/Supplier/dialog-window/index.html b/codbex-partners/gen/codbex-partners/ui/Suppliers/Supplier/dialog-window/index.html index 3a94500..31d8957 100644 --- a/codbex-partners/gen/codbex-partners/ui/Suppliers/Supplier/dialog-window/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Suppliers/Supplier/dialog-window/index.html @@ -191,7 +191,7 @@
+ text="{{ 'codbex-partners:codbex-partners-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> diff --git a/codbex-partners/gen/codbex-partners/ui/Suppliers/Supplier/main-details/index.html b/codbex-partners/gen/codbex-partners/ui/Suppliers/Supplier/main-details/index.html index 48a018c..849ffa0 100644 --- a/codbex-partners/gen/codbex-partners/ui/Suppliers/Supplier/main-details/index.html +++ b/codbex-partners/gen/codbex-partners/ui/Suppliers/Supplier/main-details/index.html @@ -189,7 +189,7 @@
+ text="{{ 'codbex-partners:codbex-partners-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}">