]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * Validates that the value does not exist in a {@link #list} of values.\r | |
3 | */\r | |
4 | Ext.define('Ext.data.validator.Exclusion', {\r | |
5 | extend: 'Ext.data.validator.List',\r | |
6 | alias: 'data.validator.exclusion',\r | |
7 | \r | |
8 | type: 'exclusion',\r | |
9 | config: {\r | |
10 | /**\r | |
11 | * @cfg {String} message\r | |
12 | * The error message to return when the passed value exists in the\r | |
13 | * specified {@link #list}.\r | |
14 | */\r | |
15 | message: 'Is a value that has been excluded'\r | |
16 | },\r | |
17 | \r | |
18 | //<debug>\r | |
19 | constructor: function() {\r | |
20 | this.callParent(arguments);\r | |
21 | if (!this.getList()) {\r | |
22 | Ext.raise('validator.Exclusion requires a list');\r | |
23 | } \r | |
24 | },\r | |
25 | //</debug>\r | |
26 | \r | |
27 | inclusion: false\r | |
28 | });\r |