Mercurial > lada > lada-client
changeset 671:08e3e7b80a34
Deskriptor validation with Regex
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Fri, 20 Mar 2015 11:25:48 +0100 (2015-03-20) |
parents | 2927abe98b66 |
children | 6160b7be468a fe527f380b10 |
files | app/view/form/Probe.js |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/form/Probe.js Thu Mar 19 15:44:17 2015 +0100 +++ b/app/view/form/Probe.js Fri Mar 20 11:25:48 2015 +0100 @@ -179,10 +179,14 @@ } }, { xtype: 'textfield', - maxLength: 100, + maxLength: 38, + enforceMaxLength: true, name: 'mediaDesk', labelWidth: 125, fieldLabel: 'Deskriptoren', + regex: new RegExp('(?:D: ){1}(?:[0-9]{2} ){11}[0-9]{2}'), + regexText: 'Die Deskriptoren haben das falsche Format.<br />'+ + 'Richtig wäre: D: 99 99 99 99 99 99 99 99 99 99 99 99', listeners: { dirtychange: { fn: this.updateOnChange,