What is field validation?
Given the variety of use cases for the same field, it is possible to customize the content that a certain field can accept as input.
To do so, KanbanBOX accepts regular expressions to be set for each field as described below.
How to set rules for field validation
- Go to Settings > Company settings.
- Click on the third tab Form settings.
- Scroll to the last section Form fields validation settings.
- Click on Edit.
- The following pop-up will appear:
-
By clicking on the Properties button, it is possible to choose which field to add the validation for.
Available fields
Category Available fields User form fields - username
- email
- external user ID
- passwordPart form fields - part number
- part description
- unit of measurement
- part custom field 1
- part custom field 2
- part custom field 3
- part custom field 4Partner form fields - partner name
- partner code
- partner custom field 1
- partner custom field 2
- partner custom field 3Loop form fields - location at supplier
- location at customer
- loop price
- loop currency
- default card reference
- loop custom field 1
- loop custom field 2
- loop custom field 3
- lead time
- consumption
- safety lead time
- minimum batch size
- multiple batch size
- required_capacity_per_unit
- grouping
- maximum bin capacityBin form fields - bin name
- bin description
- bin custom field 1
- bin custom field 2
- bin custom field 3 -
When the field has been selected, fill in the following fields:
Field Description Info message Guide for the user to understand the parameters for the input to be accepted Regex The regular expression used to validate the message Error message Text to display in case of parameters not being respected -
Click on Confirm in the pop-up.
-
Click on Save in the Company settings form.
Use cases
Use case | RegEx | Meaning |
---|---|---|
Making the Partner code field mandatory (for integration purposes) | 1. ^.+$ 2. ^.{4,8}$ |
1. .+ This will not allow a blank field while accepting anything from one character up.2. .{min_length,max_length} A specific length can be enforced at the end of the regular expression. |
Accepting specific units of measurement | ^(KG\|CM\|mq){1}$ |
- (KG\|CM\|mq) This will not allow for any unit of measurement setting outside of the specified ones (case sensitive).- {1} Only one unit is accepted per component. |
Enforcing a username standard | ^[A-Z][a-z]+_[A-Z][a-z]+$ |
- This will enforce a standard username of Name_Surname |
Validating the strength of the password in a user creation/edit | ^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{8,12}$ |
- [0-9] requires at least one number between 0 and 9- [a-z] requires at least one lower-case letter- [A-Z] requires at least one upper-case letter- {8,12} determines the minimum length of 8 characters, and the maximum length of 12 characters. |
Comments
0 comments
Please sign in to leave a comment.