Validation Javascript not working

Document ID : KB000112681
Last Modified Date : 31/08/2018
Show Technical Document Details
Question:
Validation JavaScript is being ignored in new environment, code works fine in 12.6 but is being ignored in the 14.2 installation.

function validate(FieldContext, attributeValue, changedValue, errorMessage) 
Answer:
14.x uses uses a new prototype and use screencontext. To fix the code you must use 

function validate(ScreenContext, errorMessage

Please see the information provided below the "Validation JavaScript" title below regarding screenContext

User-added image

Delete ​function validate(FieldContext, attributeValue, changedValue)  from the 12.6 JS code and use the following for 14.x:

function validate(ScreenContext, errorMessage)



 
Additional Information:
References:

Programming guide

https://docops.ca.com/ca-identity-manager/14-1/EN/programming/ca-identity-manager-programming-reference