isMultiValued = field.isMultiValued();
int requires_index = 0;
for (int i=0; i<field.getRules().size(); i++)
{
Rule rule = (Rule)field.getRules().get(i);
if ( rule.getRequiresProp()!=null )
{
requires_index++;
}
}
requires = new String[requires_index];
requiresMessage = new String[requires_index];
requires_index = 0;
RE tmpRE = null;
String tmpREMessage = null;
int tmpMinLength = 0;
String tmpMinLengthMessage = null;
int tmpMaxLength = 0;
String tmpMaxLengthMessage = null;
boolean tmpMaxLengthForce = false;
for (int i=0; i<field.getRules().size(); i++)
{
Rule rule = (Rule)field.getRules().get(i);
if ( rule.getMask() != null )
{
tmpRE = new RE(rule.getMask());
tmpREMessage = rule.getMessage();
}
if ( rule.getMinLength() != null )
{
tmpMinLength = Integer.parseInt(rule.getMinLength());
tmpMinLengthMessage = rule.getMessage();
}
if ( rule.getMaxLength() != null )
{
tmpMaxLength = Integer.parseInt(rule.getMaxLength());
tmpMaxLengthMessage = rule.getMessage();
tmpMaxLengthForce = "force".equals(rule.getAction());
}
if ( field.getGroup()!=null && rule.getRequiresProp()!=null )
{
requires[requires_index] = rule.getRequiresProp();
requiresMessage[requires_index] = rule.getMessage();
requires_index++;
}
}
regexp = tmpRE;
regexpMessage = tmpREMessage;