Validation
This is the official documentation of Forest Admin Cloud.
Most data sources can import validation rules directly. For example, in a SQL database, columns defined as VARCHAR(15)
will automatically include a rule to ensure content is shorter than 15 characters. Similarly, columns marked as NOT NULL
will require that some content is always present.
To make the code easier to read, all the code snippets below should be wrapped in the following code. Ensure you update the collection and field names as needed.
In some cases, it might be necessary to enforce stricter rules than the ones currently set in your data source. This can be achieved through the use of the addFieldValidation
method.
Last updated