def component = getFieldByName("Component/s") if((component.getValue() as Collection).size() > 1) { component.setError("Component只能选择一个") } else { component.setValid(true) component.clearError() }
Overview
Content Tools
def component = getFieldByName("Component/s") if((component.getValue() as Collection).size() > 1) { component.setError("Component只能选择一个") } else { component.setValid(true) component.clearError() }