Stages Demos:

[ Note: Stages comes without styles, you have to bring your own! ]

Custom Errors

In this first field, we wrote a custom validation which only accepts alphanumeric values and "-". Try entering something different to see the custom error message.

path: username | type: text

Sometimes you have situations where you can't just make a field required, because for example the user only needs to fill out one or the other. You can solve this situation with a dummy field and a custom validation function. Hit submit without entering data to see the behaviour. Than add data in only one field and try again.

path: field1 | type: text
path: field2 | type: text

In this example we use error codes to tell the user which strong password rules are fulfilled.

path: password | type: password

Often you want the same validation for all fields with the same type, for example emails or phone numbers. This can be achived with global type validations on the Form component:

path: email1 | type: email

path: email2 | type: email

path: phone | type: tel


- - -
(c) 2023 by Fredi Bach : Unic : Github