Skip to content

Instantly share code, notes, and snippets.

@otakustay
Created January 16, 2015 05:07
Show Gist options
  • Save otakustay/66eaba67edc668b70484 to your computer and use it in GitHub Desktop.
Save otakustay/66eaba67edc668b70484 to your computer and use it in GitHub Desktop.
/**
* SSP Account
* Copyright 2013 Baidu Inc. All rights reserved.
*
* @ignore
* @file 二级帐号结构
* @author otakustay
*/
define(
function (require) {
return {
name: [
'string', '用户名',
{
required: true,
minLength: 3,
maxLength: 32,
pattern: /^[^@#$%^&*?!+_ =~`:;"\'|\\<>,./\{\}\[\]\(\)]+$/
}
],
email: [
'string', '电子邮件',
{
required: true,
maxLength: 100,
pattern: /^([-+.\w]+)*@\w+([-.\w]+)*\.\w+([-.\w]+)*$/
}
],
password: ['string', '原始密码', {required: true, minLength: 6, maxLength: 32}],
description: ['string', '备注', {maxLength: 1000}]
};
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment