0 Replies Latest reply on Oct 19, 2006 8:16 AM by mrbahr

    Using Validators with Formatters

    mrbahr Level 1
      I really like the functionality of the validators in that they highlight the text area and provide automatic validation text. I also really like the functionality of the formatters. Is there a good way to use these together so that you don't end up in an endless event loop when trying to validate and format a value in a single text field. So the scenario is as follows:

      1) put a single text field on a canvas (assume for purposes it is a phone number)
      2) Create a validator for it
      3) create a formatter for it

      The behavior that I am looking for is that when the user enters a valid phone number and leaves the field, the text within the textbox changes to the formatted phone number. If the entry is invalid when the user leaves, then it remains in the textbox (if it is required) until the phone number is valid.

      All of the examples have the formatted text show up in a label somewhere. I'd like the value of the textbox replaced by the formatted text.

      Any thoughts on the best way to do this?

      Thanks....