A sample use case presents such where form validation is only required for record update, not for record creation.
This is possible by adding an empty section in a form to store this script below. This script will remove form validation if primary key does not exist (which is in add mode).
Sample app is available in the link below:
Credits to: panda