A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Help required on simple validations for Flex Numeric Stepper

  1. #1
    Senior Member
    Join Date
    Jun 2009

    Thumbs up Help required on simple validations for Flex Numeric Stepper


    I need a small help in Flex Numeric Stepper validation.

    I have setted a min value to 1 and max value to 10, Now my requirement is when ever user can enter a value other than the range between 1 - 10, i want to display an alert saying "please enter the val's between 1 and 10". I want this scenario to be success in all possible event listeners like Keyboardevents/mouseevents/default numeric stepper events. Actually i am failing to produce an alert if i typed the value as "0". Other than this everything is fine.

    i am attaching the code as well for reference. i need solution asap.
    your help will be appreciated.

    Attached Files Attached Files

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    press the picture...
    This line alone should do the job. You are comparing a string and a number in your script.
    if(int(nsTextInput) < ns.minimum || int(nsTextInput) > ns.maximum)
    - The right of the People to create Flash movies shall not be infringed. -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center