# Need some validation help

**URL:** <https://forum.kirupa.com/t/need-some-validation-help/195983>\
**Category:** flash\
**Created:** [August 4, 2006, 12:18pm UTC](https://forum.kirupa.com/t/need-some-validation-help/195983 "2006-08-04T12:18:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul\_ferrie](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@paul\_ferrie](https://forum.kirupa.com/u/paul_ferrie)\
**Post date:** [August 4, 2006, 12:18pm UTC](https://forum.kirupa.com/t/need-some-validation-help/195983/1 "2006-08-04T12:18:07Z")

</div>

Hi guys.  
I have a textfield.  
The textfield is set only to allow numbers and dot.  
I need to validate to check that what has been input meets the requirements of the data does not start with a 0 like 0123.99 or .0123.99 or 123.99.99  
I was thinking use a function

```auto

function validate(toVal){
 //Do the validation here
 }

```

THen the button code to trigger it.

```auto

nBut.onRelease = function() {
 return validate(tx1);
 if (validate) {
  validate = false;
  return validate(tx2);
 }
 if (validate) {
  return validate(tx3);
  //Move onto next form if all fields validate
 }
};

```

I know this but is wrong. Any help on this would be very much appreciatted  
thanks  
Paul
