Validators can be used on AssetTrack forms to make sure data is filled out correctly. There are 3 main validators that are shown below. Along with 3 different levels of Validation. Our validators also use Regular Expressions (Regex) to match patterns. If you need help with making these Regular Expressions please reach out to support at email@example.com
Collection Validation Levels
Error: This will cause the form to error, and not allow any uploads to happen until the error is fixed.
Warning: This will cause the form to throw a warning message informing the user that there is an error, but if they do not have the necessary information they can continue to upload the information.
Message: This will display a message on the field once you open the form. This can be used for informational purposes to help the user know more about how the field should be filled in.
This validator you can attach to any fields to require the field to be filled in. If the field is blank, the form will not be allowed to upload. The Message can be customized to display any message to the user if the validator is triggered.
This validator allows you to attach a Regular Expression to the field to make sure they are the correct values. The Regular Expression is applied to the "Pattern" field shown below. This validator can help make sure only certain values are allowed to be entered into the field. A customized messaged can be applied for the user when the validator is triggered.
String Pattern with Controlling Field
This validator allows you to connect two fields together based on certain criteria. This can be used to require a field to be filled in when another field has a certain choice or is not empty. In the "Message" section you can apply a customized message for the user to know what is the error. In the "Pattern" section you would apply the Regular Expression (Regex) for the field you are applying this validator. In the "Controlling Field" drop down, you would choose the field that is controlling the field getting the validator. In the "Controlling Field Pattern" you would apply a Regular Expression that triggers this validator, when the Controlling field matches.
Applying "String Pattern with Controlling Field" to Assign To.
Message: Assign To is required when State is "In Use"
Pattern: ^.+$ (This means "Not Empty" in Regex)
Controlling Field: State
Controlling Field Pattern: ^1$ (1 is the value for In Use)