package com.validator;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;
import com.model.Notice;

import java.util.HashMap;
import java.util.Map;

public class BookNewValidator extends Validator {
	
	protected void validate(Controller controller) {
//		validateRequiredString("bean.title", "titleMsg", "请输入标题!");
//		validateRequiredString("bean.content", "contentMsg", "请输入内容!");
	}
	
	protected void handleError(Controller controller) {
		controller.keepModel(Notice.class);
		String actionKey = getActionKey();
		Map result = new HashMap();
		result.put("code","101");
		result.put("msg","参数不完整");
		controller.renderJson(result);

	}
}
