package jp.co.infomart.common.admin.util;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import jp.co.infomart.common.admin.constant.AdminConstants;
import jp.co.infomart.common.common.constant.Constants;
import jp.co.infomart.common.common.util.StringUtils;
/**
*
* @author Admin
*/
public class CopStringUtils {
/**
* Fax番号チェック. <br>
*
* @param value Fax番号
* @return true, <br> false
*/
public static boolean isFaxNum(String value) {
if (value == null || Constants.BLANK.equals(value)) {
return false;
}
// Pattern pattern = Pattern.compile("\\d{4}-\\d{2}-\\d{4}");
Pattern pattern = Pattern.compile("^(\\d|-)*$");
Matcher matcher = pattern.matcher(value);
return matcher.matches();
}
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import jp.co.infomart.common.admin.constant.AdminConstants;
import jp.co.infomart.common.common.constant.Constants;
import jp.co.infomart.common.common.util.StringUtils;
/**
*
* @author Admin
*/
public class CopStringUtils {
/**
* Fax番号チェック. <br>
*
* @param value Fax番号
* @return true, <br> false
*/
public static boolean isFaxNum(String value) {
if (value == null || Constants.BLANK.equals(value)) {
return false;
}
// Pattern pattern = Pattern.compile("\\d{4}-\\d{2}-\\d{4}");
Pattern pattern = Pattern.compile("^(\\d|-)*$");
Matcher matcher = pattern.matcher(value);
return matcher.matches();
}