Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Data validation on a FORM

salvdangelo
Level 5
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
kapilKochar
Correct answer by
Community Advisor
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
kapilKochar
Community Advisor
Community Advisor

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

kapilKochar
Correct answer by
Community Advisor
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