Home About Us Our Work Software Development Software Integration Support Services Contact Us
 
OpenLinks Capabilities
Software Features
Data Mapping
Handlers
Standard Validators
Custom Validators
Scheduling System
Monitoring
Dashboard
back to Software Integration...

OpenLinks > Standard Validators


OpenLinks arrives with a range of industry standard validation methods to safeguard the destination database or application from corrupt data.  These validators are applied when building the OpenLinks Service Configuration File  

date
Ensures the data is in the correct format for a data field.

mandatory
Ensures a vlaue is always present

Equals
Ensures a vlaue is always equals a defined value

Money
Ensures a vlaue is in a currency format

minlength
Ensures a vlaue is always longer in length than a defined value

maxlength
Ensures a vlaue is never longer than a defined value

alpahnumeric
Ensures a vlaue is always an alphanumeric

time
When validating on the server, ensures that the value is a correct time format

float
A number; allows integers. When validating form fields on the server, integer values are converted to real numbers.

numeric
A number; allows integers. When validating form fields on the server, integer values are unchanged.

integer
An integer.

range
A numeric range specified by a range attribute or max and min attributes.

boolean
A value that can be converted to a Boolean value: Yes, No, True, or False, (all case-independent), or a number.

email
A valid e-mail address of the form name@server.domain. ColdFusion validates the format only; it does not check that entry is a valid active e-mail address.

URL
A valid URL pattern; supports http, https, ftp file, mailto, and news URLs.

regex * or regular_expression *
Matches the value against a regular expression specified in a pattern attribute. Valid in HTML and XML format only; ignored in Flash format.

maxlength
Limits the input to a maximum number of characters specified by a maxlength attribute.

noblanks
Does not allow fields that consist only of blanks. ColdFusion uses this validation only if the required attribute is True.

array
An array of values

alpha
A string value or single character

 

Example

We can see below how a validator is applied to the OpenLinks Service Configurator File

<?xml version="1.0" encoding="UTF-8"?>
<openlinks>
   <incomingfeed>
      <feedsource>file:E:\\stores\\HEN\\_tmp\\XML\\ProductLevel.xml</feedsource>
      <element rootpath="/product">
         <table>elements_products</table>
         <keymapping validator="maxlength:10">
            <xpath>/product/code</xpath>
            <column>ATTR_ModelNumber</column>
         </keymapping>
         <mapping validator="maxlength:100">
            <xpath>/product/title</xpath>
            <column>ATTR_Headline</column>
         </mapping>
         <mapping>
            <xpath>/product/description/text()</xpath>
            <column>ATTR_description</column>
         </mapping>
         <mapping>
            <xpath>/product/unit</xpath>
            <column>ATTR_Unit</column>
         </mapping>
         <mapping>
            <xpath>/product/image</xpath>
            <column>ATTR_Image</column>
         </mapping>
      </element>
      <element rootpath="/product/items/item" handler="ci.henselite.feed.ItemHandler">
         <table>elements_flex20</table>
         <keymapping validator="maxlength:100">
            <xpath>/item/code</xpath>
            <column>ATTR_Code</column>
         </keymapping>
         <mapping>
            <xpath>/item/title</xpath>
            <column>ATTR_Title</column>
         </mapping>
         <mapping>
            <xpath>/item/price</xpath>
            <column>ATTR_Price</column>
         </mapping>
         <mapping>
            <xpath>/item/attributes/attribute[@name='Size']</xpath>
            <column>ATTR_Size</column>
         </mapping>
         <mapping>
            <xpath>/item/attributes/attribute[@name='Weight']</xpath>
            <column>ATTR_Weight</column>
         </mapping>
         <mapping>
            <xpath>/item/attributes/attribute[@name='Grip']</xpath>
            <column>ATTR_Grip</column>
         </mapping>
         <mapping>
            <xpath>/item/attributes/attribute[@name='Colour']</xpath>
            <column>ATTR_Colour</column>
         </mapping>
         <!-- see ci.henselite.feed.ItemHandler for implementation details
         <mapping>
            <xpath>/product/code</xpath>
            <column>fk_product_code</column>
         </mapping>
          -->
      </element>
   </incomingfeed>
</openlinks>