|
Lines 171-177
define([
Link Here
|
| 171 |
name: 'name', |
171 |
name: 'name', |
| 172 |
type: TextBox, |
172 |
type: TextBox, |
| 173 |
validator: function(value) { |
173 |
validator: function(value) { |
| 174 |
return (/^[a-z]+[0-9]+(\.[0-9]+)?$/).test(value); |
174 |
if (value.length > 15 || value === '.' || value === '..') |
|
|
175 |
return false; |
| 176 |
return /^(?![.]{1,2}$)[^/ \t\n\r\f]{1,15}(\.[0-9]+)?$/.test(value) |
| 175 |
}, |
177 |
}, |
| 176 |
visible: false |
178 |
visible: false |
| 177 |
}, { |
179 |
}, { |
|
Lines 182-188
define([
Link Here
|
| 182 |
type: TextBox, |
184 |
type: TextBox, |
| 183 |
validator: lang.hitch(this, function(value) { |
185 |
validator: lang.hitch(this, function(value) { |
| 184 |
if (this.getInterfaceType() === 'Bond' || this.getInterfaceType() === 'Bridge') { |
186 |
if (this.getInterfaceType() === 'Bond' || this.getInterfaceType() === 'Bridge') { |
| 185 |
return (/^[a-zA-Z]+[0-9]+$/).test(value); |
187 |
return /^(?![.]{1,2}$)[^/ \t\n\r\f]{1,15}$/.test(value) |
| 186 |
} |
188 |
} |
| 187 |
return true; |
189 |
return true; |
| 188 |
}), |
190 |
}), |