Comments

1 comment

  • Avatar
    Jake

    If you need your users to provide a file, such as a license file, you can find useful to check for a particular set of extensions. This goal can be achieved using a <regExMatch> rule:

    <fileParameter>
        <name>licensekey</name>
        <title>Install License</title>
        <explanation>Please specify the license key you would like to use.</explanation>
        <allowEmptyValue>0</allowEmptyValue>
        <ask>yes</ask>
        <validationActionList>
            <throwError>
                <text>License file should be "license.key"</text>
                <ruleList>
                    <!-- Checks for .key and .reg extensions. To add more extensions: .*\.(key|reg|other|other2)$ -->
                    <regExMatch text="${licenseKey}" logic="does_not_match" pattern=".*\.(key|reg)$"/>
                </ruleList>
            </throwError>
        </validationActionList>
    </fileParameter>

Please sign in to leave a comment.