How to prevent preCreate function from running if field validation fails?

How to prevent preCreate function from running if field validation fails?

johnwickjohnwick Posts: 1Questions: 1Answers: 0

When a new entry is create if the field validation is not satisfied, the preCreate
function still creates a gap for the new value.

It would get good to restrict it (preCreate) and only run it if the form validation successful.

Is this possible or am I doing something incorrectly?

Answers

  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    preCreate is intentionally run before the validation so that you can potentially add validation methods in preCreate.

    I don't quite understand why preCreate would create a gap (are you doing an INSERT in preCreate and then UPDATEing that newly created row?

    Allan

This discussion has been closed.