I have a field that I am limiting to no more than 25 characters using the behaviors plugin. The rule works when you try to exceed 25 characters from an edit screen. However, from the view screen you can still change it to exceed 25 characters. Is it possible to fix this so that it simply cannot exceed 25 characters from any screen?
def field = getFieldByName("Use Case Product")
if ((field?.value as String)?.length() > 25) {
field.setError("Length of the field should be less than 25 chars")
} else {
field.clearError()
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.