behavior_defineEmailFormat_customField

PHOTO EMBED

Wed Nov 13 2024 17:46:33 GMT+0000 (Coordinated Universal Time)

Saved by @belleJar

// Reviewer DL

def cfName = getFieldByName("Reviewer DL")
cfName.clearError()
String cfNameValue = cfName.getValue()
if (cfNameValue.endsWith("-rev")) return
if ((cfNameValue.endsWith(".rev@email.com")))return
if (cfNameValue.length() > 1)
    cfName.setError("should end with .rev@email.com or -rev without @email.com")
content_copyCOPY

restrain string field to email format input