For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cheat sheet - sample script validators

The code snippets below show example script validators written in ScriptCode.

The provided templates are for illustrative purposes and require adaptation. The input parameter specification, dedicated business logic, and the appropriate content of validation messages must be taken into account. Each implementation should be covered by unit tests, including edge-case scenarios.

PESEL number validator

Used to verify the correctness of the provided PESEL number.

Age validator

Used to verify age based on the date of birth. Checks whether the person has reached the age of 15.

Birth year validator

Used to verify whether the entered date of birth is not earlier than 1900.

ID card number validator

Used to verify the Polish ID card number.

Email address validator

Used to verify the format and syntax of the entered email address.

File size validator

Used to check whether the total size of all attached files does not exceed the allowed limit.

Minimum value validator

Used to verify whether the amount or number entered by the user meets the lower limit requirement.

Duplicate validator

Used to check whether there are duplicates among the values provided by the user, using PESEL numbers as an example.

Validator for the number of selected checkboxes

Used to verify whether at least one checkbox from the given group has been selected on the form.

Last updated

Was this helpful?