|
21 | 21 |
|
22 | 22 | /** |
23 | 23 | * @module FrameworkBuilders |
24 | | - * @version 1.9.7 |
| 24 | + * @version 2.0.0 |
25 | 25 | */ |
26 | 26 |
|
27 | 27 | 'use strict'; |
28 | 28 |
|
29 | | -var UNDEFINED = 'undefined'; |
30 | | -var FUNCTION = 'function'; |
31 | | -var OBJECT = 'object'; |
32 | | -var STRING = 'string'; |
33 | | -var NUMBER = 'number'; |
34 | | -var BOOLEAN = 'boolean'; |
35 | | -var REQUIRED = 'The field "@" is required.'; |
36 | | -var DEFAULT_SCHEMA = 'default'; |
37 | | -var SKIP = { $$schema: true, $$result: true, $callback: true, $$async: true }; |
| 29 | +const UNDEFINED = 'undefined'; |
| 30 | +const FUNCTION = 'function'; |
| 31 | +const OBJECT = 'object'; |
| 32 | +const STRING = 'string'; |
| 33 | +const NUMBER = 'number'; |
| 34 | +const BOOLEAN = 'boolean'; |
| 35 | +const REQUIRED = 'The field "@" is required.'; |
| 36 | +const DEFAULT_SCHEMA = 'default'; |
| 37 | +const SKIP = { $$schema: true, $$result: true, $callback: true, $$async: true }; |
38 | 38 |
|
39 | 39 | var schemas = {}; |
40 | 40 | var transforms = { pagination: {}, error: {}, objectbuilder: {}, transformbuilder: {} }; |
@@ -149,13 +149,6 @@ function SchemaBuilderEntity(parent, name, obj, validator, properties) { |
149 | 149 | this.CurrentSchemaInstance = function(){}; |
150 | 150 | this.CurrentSchemaInstance.prototype = new SchemaInstance(); |
151 | 151 | this.CurrentSchemaInstance.prototype.$$schema = this; |
152 | | - |
153 | | - var self = this; |
154 | | - |
155 | | - setTimeout(function() { |
156 | | - if (self.onValidation) |
157 | | - OBSOLETE(self.name, 'Instead of "SchemaBuilderEntity.onValidation()" use "SchemaBuilderEntity.setValidate()"'); |
158 | | - }, 2000); |
159 | 152 | } |
160 | 153 |
|
161 | 154 | /** |
@@ -453,11 +446,6 @@ SchemaBuilderEntity.prototype.setValidate = function(properties, fn) { |
453 | 446 | return self; |
454 | 447 | }; |
455 | 448 |
|
456 | | -SchemaBuilderEntity.prototype.setValidation = function(properties, fn) { |
457 | | - OBSOLETE(this.name, 'Instead of "SchemaBuilderEntity.setValidation()" use "SchemaBuilderEntity.setValidate()"'); |
458 | | - return this.setValidate(properties, fn); |
459 | | -}; |
460 | | - |
461 | 449 | SchemaBuilderEntity.prototype.setPrefix = function(prefix) { |
462 | 450 | this.resourcePrefix = prefix; |
463 | 451 | return this; |
|
0 commit comments