added LengthRule
fixes to setElementAttr()
allowed empty values for RegexRule and EnumRule