(dataProperty)
| 7195 | } |
| 7196 | |
| 7197 | function addValidators(dataProperty) { |
| 7198 | var typeValidator; |
| 7199 | if (!dataProperty.isNullable) { |
| 7200 | dataProperty.validators.push(Validator.required()); |
| 7201 | } |
| 7202 | |
| 7203 | if (dataProperty.isComplexProperty) return; |
| 7204 | |
| 7205 | if (dataProperty.dataType === DataType.String) { |
| 7206 | if (dataProperty.maxLength) { |
| 7207 | var validatorArgs = { maxLength: dataProperty.maxLength }; |
| 7208 | typeValidator = Validator.maxLength(validatorArgs); |
| 7209 | } else { |
| 7210 | typeValidator = Validator.string(); |
| 7211 | } |
| 7212 | } else { |
| 7213 | typeValidator = dataProperty.dataType.validatorCtor(); |
| 7214 | } |
| 7215 | |
| 7216 | dataProperty.validators.push(typeValidator); |
| 7217 | |
| 7218 | } |
| 7219 | |
| 7220 | function isIdentityProperty(csdlProperty) { |
| 7221 | // see if web api feed |
no outgoing calls
no test coverage detected