package cn.hmsoft.skill.helper.examid;

import cn.hmsoft.helper.StringHelper;
import cn.hmsoft.skill.helper.ExamIdHelper;
import cn.hmsoft.skill.helper.SkillParamHelper;

/***************************
 * 湖北考生号检查
 * 
 * @author zxq
 * @create 2018-11-06 11:08:16
 * @version 5.0.0
 * @email: revisit@126.com
 * @Company: www.hmsoft.cn
 */
public class ExamId42 extends ExamIdHelper {

	@Override
	protected String validExamId(String exam_id) {
		
		// 18422802800131
		if (StringHelper.isEmpty(exam_id))
			return "考生号不允许为空！";
		else if (exam_id.length() != 14)
			return "考生号长度必须为14位";
		
		else if (!exam_id.startsWith(SkillParamHelper.getShortYear() + "42"))
			return "考生号必须以 " + (SkillParamHelper.getShortYear() + "42 开头");
		return null;
	}


}
