Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A great deal of the DXF controls are able to use at least one validation. This section will explain how to use every validation available and in which controls they can be applied.


Required


Indicates a required filed.

To use this validation, use the name required.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="required" />
</dxf:template>

Display

Panel
titleAvailable for
  • String Control
  • Integer Control
  • Password Control
  • Scheduler Control
  • Textarea Control

Url


Use when the expected string is a url. It validates the format of the url to be <something>://<something>. Also allows the use of settings variables.

To use this validation, use the name url.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="url" />
</dxf:template>

Display


Panel
titleAvailable for
  • String Control

List Urls


Use this validation when the expected string from a textarea is a list of urls. It validates the format per line of the url to be <something>://<something> or a settings variable

To use this validation use the name listurls or listurl.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="textarea" display="Example" validations="listurls" />
</dxf:template>

Display


Panel
titleAvailable for
  • Textarea Control

Protocols


You can specify the allowed protocols in a url or a list of urls using the protocols attribute.

To use this validation, you must have the validation url or the listurlslisturl and add the attribute protocols with the list of the protocols separated by a comma ( , )

Note

If a settings variable is used for the protocol, the validation is ignored.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example>
		<example1 type="string" display="Example" validations="url" protocols="https"/>
		<example2 type="textarea" display="Example" validations="listurls" protocols="https"/>
	</example>
</dxf:template>

Display


Integer


Use this validation when the expected string is a number without commas or dots, and it can be negative or positive, without limits.

To use this validation, use the name integer or int.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="integer" />
</dxf:template>

Display


Panel
titleAvailable for
  • String Control

Float


Use this validation if the expected string is a number with or without decimal or limits.

To use this validation use the name float or double.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="float" />
</dxf:template>
Panel
titleAvailable for
  • String Control
Float validated formats
  • 1
  • -1.2e3
  • 1.0
  • -1.2E+3
  • 1.1
  • -1.2E-3
  • -1.0
  • -1.2e+3
  • +1.0
  • -1.2e-3
  • 1.2E3
  • +1.2E3
  • 1.2e3
  • +1.2e3
  • 1.2E+3
  • +1.2E+3
  • 1.2E-3
  • +1.2E-3
  • 1.2e+3
  • +1.2e+3
  • 1.2e-3
  • +1.2e-3
  • -1.2E3

Min & Max


You can specify a minimum and maximum limit to the inserted string using the min and max attribute.

To use this validation, you must use an Integer control and add the attribute min and max.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
  	<example>
		<example1 type="integer" display="Example" validations="integer" min="0" max="10"/>
  		<example2 type="integer" display="Example" validations="integer" min="0" max="10"/>
	</example>
</dxf:template>

Display

Panel
titleAvailable for
  • Integer Control

Cron


Use when the expected string is a cron expresion, it validates the format of the cron.

To use this validation, use the name cron.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="cron" />
</dxf:template>

Display

Panel
titleAvailable for
  • String Control

Maven


Use this validation when the expected string is a maven coordinate.

To use this validation, use the name maven.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="maven" />
</dxf:template>

Display

Panel
titleAvailable for
  • String Control

Min Length & Max Length


You can specify a minimum and maximum size of the inserted string using the min and max attribute.

To use this validation, you must use the names minlength and maxlength and add the attribute min and max, respectively.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example>
		<example1 type="string" display="Example" validations="minlength, maxlength" min="10" max="12"/>
		<example2 type="string" display="Example" validations="minlength, maxlength" min="10" max="12"/>
	</example>
</dxf:template>

Display

Panel
titleAvailable for
  • String Control
  • Password Control
  • Textarea Control

Regex


Use this validation when none of the previous validations fulfill your needs for the expected string. With this validation you can use a regex to validate the string.

To use this validation, use the name regex or pattern and add the attribute regex with the desired regex expression to validated the string.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="regex" regex="hi" />
</dxf:template>

Display

Panel
titleAvailable for
  • String Control
  • Password Control
  • Textarea Control

Path


Use this validation when the expected string is a relative path or an absolute path which starts with "[a-z]:\" or "\\" for windows, or "/" for linux. It also checks for invalid characters.

To use this validation, use the name path.

DXF Template Example

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="path" />
</dxf:template>

Display

Panel
titleAvailable for
  • String Control

Time Period


Use this validation when the expected string is a time period.

To use this validation, use the name timeperiod or time.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="timeperiod" />
</dxf:template>

Display

Panel
titleAvailable for
  • String Control
Panel
titleTime period validated formats
  • 1ms (milliseconds)

  • 1s (seconds)
  • 1m (minutes)
  • 1h (hours)
  • 1d (days)

Invalid Characters


Use this validation to check for invalid characters, invalid for a folder or file name.

To use this validation, use the name invalidchars.

DXF Template

Code Block
languagexml
<dxf:template version="1.0"  xmlns:dxf="http://www.searchtechnologies.com/DXF/2011">
	<example type="string" display="Example" validations="invalidchars" />
</dxf:template>

Display

Panel
titleAvailable for
  • String Control