Validating the first position of a field?


i new livecycle designer (7.0) , javascript , hoping can or point me in direction find answer question.

i using text file needs verified see if first position contains 1, 2 or 0.

what have

var 1var = /^d{1}$/

but not know next.

any appreciated.

this added on exit of particular field (if value entered manually) -

var numfilter = /^[0-2]$/ //(regular expression value between 0 & 2)

if (!(numfilter.test(this.rawvalue))) //(checks whether thingy met)
{
app.alert('bla bla bla ...\n'); //(alerts user )
this.rawvalue = "" //(resets value blank)
}


More discussions in LiveCycle pre-ES (6.x and 7.x) discussions


adobe

Comments