?? validator.java
字號(hào):
// Copyright 2005-2007 onetsoft.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.onetsoft.fastjsp.valid;
import java.util.Locale;
/**
* 驗(yàn)證器接口
*
* @author <a href="mailto:hgw@onetsoft.com">hgw</a>
*/
public interface Validator extends Cloneable {
/**
* 校驗(yàn)指定域的輸入
*
* @param Value
* @param locale
* @param provider
* @return 返回校驗(yàn)結(jié)果信息。若成功,返回null,否則返回錯(cuò)誤信息
* 返回消息為格式化字符串,如:"{0}不能小于100"
*/
String validate(String Value, Locale locale, ValidationMessageProvider provider);
/**
* 取得錯(cuò)誤信息
*
* @param locale
* @param provider
* @return
*/
String getMessagePattern(Locale locale, ValidationMessageProvider provider);
/**
* 取得驗(yàn)證限定
* 若沒有就返回空字符串
*
* @return
*/
String getLimit();
/**
* 取得javascript驗(yàn)證方法名稱
*
* @return
*/
String getJSFunction();
Object clone();
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -