Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Data validation on a FORM

Avatar

Level 5

Hello,

I need to know how it's possible to implement data validation on input form

Simple case (value not dependent on persisent data) is clear to me:

  <leave>

    <check expr="@id !=''">

      <error>You must populate the Id</error>

    </check>

   </leave>

I don't understand how to make more complex check on input data

For instance: Avoid that ID input data typed by the operator already exists on the table MyTable (whose key is ID) that I'm populating with this form

Jean-Serge Biron

davidk23955130

wodnicki

Amit_Kumar

Amy_Wong

Adobe Campaign Classic

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Okay so I got the answer for this now. I have a case where i want to validate URL field over form using Regex.

Steps

A) Create a new method in that schema .

B) create one JavaScript file for that scehma and with function definition

C) In form , call above define method using soapCall tag

<leave>

                      <soapCall name="methodName" service="cus:schemaName">                      

                        <param exprIn="@param" type="string"/>

                      </soapCall>

</leave>

Thanks,

Kapil

View solution in original post

2 Replies

Avatar

Community Advisor

I have similar question, I want to add Email validation Regex over Forms using <check expr> . Can someone please help.

Avatar

Correct answer by
Community Advisor

Okay so I got the answer for this now. I have a case where i want to validate URL field over form using Regex.

Steps

A) Create a new method in that schema .

B) create one JavaScript file for that scehma and with function definition

C) In form , call above define method using soapCall tag

<leave>

                      <soapCall name="methodName" service="cus:schemaName">                      

                        <param exprIn="@param" type="string"/>

                      </soapCall>

</leave>

Thanks,

Kapil