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 HotBookValidator extends Validator {
	
	protected void validate(Controller controller) {
		//validateRequiredString("bean.title", "isbn", "请输入isbn!");
		//validateRequiredString("bean.bookname", "bookname", "请输入图书名称!");
	}
	
	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);

	}
}
