codecamp

默认国际化资源文件内容

默认国际化资源文件内容

验证框架的默认国际化资源文件名称为 validation.properties,其内容如下:

ymp.validation.compare_not_eq={0} can not eq {1}.
ymp.validation.compare_eq={0} must be eq {1}.

ymp.validation.datetime={0} not a valid datetime.

ymp.validation.email={0} not a valid email address.

ymp.validation.length_between={0} length must be between {1} and {2}.
ymp.validation.length_min={0} length must be gt {1}.
ymp.validation.length_max={0} length must be lt {1}.

ymp.validation.numeric={0} not a valid numeric.
ymp.validation.numeric_between={0} numeric must be between {1} and {2}.
ymp.validation.numeric_min={0} numeric must be gt {1}.
ymp.validation.numeric_max={0} numeric must be lt {1}.

ymp.validation.regex={0} regex not match.

ymp.validation.requried={0} must be requried.
默认验证器及参数说明
验证框架使用示例
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }