[API] Implement birthday setting

This commit is contained in:
syuilo
2017-01-06 15:35:07 +09:00
parent 901ec06f3f
commit fe691bccbf
3 changed files with 16 additions and 1 deletions

View File

@ -8,3 +8,7 @@ export default collection;
export function validateUsername(username: string): boolean {
return /^[a-zA-Z0-9\-]{3,20}$/.test(username);
}
export function isValidBirthday(birthday: string): boolean {
return /^([0-9]{4})\-([0-9]{2})-([0-9]{2})$/.test(birthday);
}