Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

format licence number problem - lead zero

$
0
0

Hi All,

I have tried to fix my coding but it is not successful. Please help.

 

when I open the for the errors message is displayed this rawValue = null;

this field allows enter numeric only - max: 24 digits, allow enter from 19 digits up to 24 digits.

 

exit event

if(this.rawValue.length==0)

 

this.rawValue.length=0;

 

if(this.rawValue.length!=0){

 

if (this.rawValue.length =="19")

 

  // cancel the change

 

  this.rawValue =this.rawValue +"00000" 

 

  elseif (this.rawValue.length =="20")

 

  // cancel the change

 

  this.rawValue =this.rawValue +"0000" 

 

   elseif (this.rawValue.length =="21")

 

  // cancel the change

 

  this.rawValue =this.rawValue +"000" 

 

   elseif (this.rawValue.length =="22")

 

  // cancel the change

 

  this.rawValue =this.rawValue +"00" 

 

   elseif (this.rawValue.length =="23")

 

  // cancel the change

 

  this.rawValue =this.rawValue +"0" 

 

 

 

 

validator.validateRollNumber(xfa.event)

 

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

 

//function from object script document

function validateRollNumber(evnt)

{

var pattern =/^[0-9]{19,24}$/;

  

if(evnt.target.rawValue!=null)

 

// if user's input does NOT match the pattern, display a validation message

 

if(!evnt.target.rawValue.match(pattern))

 

evnt.target.rawValue="";

 

 

}

Thanks,

Cindy

 

 


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>