Validation only when digits entered


i use designer 7.0 create forms.
i wanted use following script in
exit event check if user enters digits or letters ,
enable or disable validation script.

//var reg = /^\d+$/;
var reg = /\d+/;

var check = reg.exec(xfa.resolvenode("#subform[0].#field[0]").rawvalue);
if (check == null)

xfa.host.validationsenabled.false

else

xfa.host.validationsenabled.true
this.rawvalue >= -5 && this.rawvalue <= 5;

endif

it not work
and have problems using if in scripts because
don't know exact way use it.
also don't know if validationsenabled term used correct because
i found here in forum not needs.

thank's

a.x.wimmer



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


adobe

Comments