Fieldvalidation problem

I’m having a lot of problems crating at fieldvalidation formula. The field is a textfield and the only allowed values should be “” ; “-” or a numeric value between 0 and 9999.

This should not be any problem, but I can’t make it work. Any ideas??

O

Subject: Fieldvalidation problem

create an @if using @TextToNumber( string )

something like this:

@if(

  @text(field) = ""; @true;

  @text(field) = "-"; @true;

  @textToNumber(field) > 0 & ; @textToNumber(field) < 9999; @true;

  @false

)

Subject: RE: Fieldvalidation problem

The following formula works just great:

@if(

@text(field) = “”; @Success;

@text(field) = “-”; @Success;

@textToNumber(field) > 0 & @textToNumber(field) < 9999; @Success;

@Failure(“Your message”)

)

Thanks