|
@@ -8,5 +8,11 @@ Ext.define('saas.override.form.field.TrimVtype', {
|
|
|
// RegExp for the value to be tested against within the validation function
|
|
// RegExp for the value to be tested against within the validation function
|
|
|
trimRe: /(^ .*)|(.* $)/,
|
|
trimRe: /(^ .*)|(.* $)/,
|
|
|
// vtype Text property: The error text to display when the validation function returns false
|
|
// vtype Text property: The error text to display when the validation function returns false
|
|
|
- trimText: '请不要在内容的开头和结尾添加空格'
|
|
|
|
|
|
|
+ trimText: '请不要在内容的开头和结尾添加空格',
|
|
|
|
|
+
|
|
|
|
|
+ // 正数验证
|
|
|
|
|
+ positiveNumber: function(value) {
|
|
|
|
|
+ return value > 0;
|
|
|
|
|
+ },
|
|
|
|
|
+ positiveNumberText: '该输入项必须是一个正数'
|
|
|
});
|
|
});
|