Backend field validation

Based on “Show/hide field based on a backend calculation” would be great to have Backend Field validation

Could you please elaborate more it with example

  • Add VAT field in account module
  • Validate VAT field in account module to find duplicates by Process API
  • If Process Api find a duplicate, return a “Duplicate Account” error
1 Like

Could you not just make this a Duplicate Merge field in Studio to accomplish the same thing?

I’d like to find duplicates BEFORE I save record, this is only an example; with callback you may have more complex validations.
Anyway there are more request (and solutions) for 7.x

I think duplicate merge happens before save and asks you if you really want to create a new record.

This is the way - saved my bacon a number of times… gives you the opportunity to cancel before save too or proceed anyway

I do not able to replicate, and I’don’t find code about this on the repostory

Finally, 8.9 has async-validator that match “backend field validation”

https://docs.suitecrm.com/8.x/admin/releases/8.9/

Yes, what is use of async-validator? Where could we use it?

https://docs.suitecrm.com/8.x/developer/metadata/fields/field-options/async-validator/

You can validate a field value by a backend call (process handler).
For example you can

check record duplicates
VAT syntax
IBAN syntax
custom string syntax

and many other useful validation, simply writing a ProcessHandler class that do it.

1 Like

Hi, thank you for your suggestion.

We’re pleased to say this has been implemented as part of the SuiteCRM 8.9 Async Validators feature.

We will now mark this suggestion as closed, but we truly appreciate your contribution to the project.

1 Like