export const isPositiveInteger = function(value) { | export const isPositiveInteger = function(value) { | ||||
var re = /^[0-9]+$/ ; | var re = /^[0-9]+$/ ; | ||||
return re.test(value) | return re.test(value) | ||||
} | |||||
/** | |||||
* 校验数字、字母或汉字 | |||||
*/ | |||||
export const isNoCharacters = function(value) { | |||||
var re = /^[\u4e00-\u9fa5_a-zA-z0-9]+$/ ; | |||||
return re.test(value) | |||||
} | } |