[CLOSED] NumberField - Validation

  1. #1

    [CLOSED] NumberField - Validation

    Good Morning all

    I need to Validate the Input of a NumberField.

    Required: Decimal 12,3

    Id did this :
    • NumberField
    • MaxLength="12"
    • DecimalPrecision="3"


    The Validation seems to work only for the 'MaxLenght'.

    I tried 'MaxLenght=16' to include the Decimal Separator and take the whole Number - doesn't work.
    I also tried to define the Decimal Separator with it's Attribute (set to '.') doesn't work either...

    Could some one give me an Example how to Validate an Decimal 12.3 input ? We need to deliver a solution ASAP...

    Kind Regards

    Peter
    Last edited by Daniil; Nov 07, 2014 at 10:39 AM. Reason: [CLOSED]
  2. #2
    Hi Peter,

    There is no such the functionality to set individual MaxLenght for integer and decimal parts.

    Maybe, a TextField with an InputMask?
    https://examples2.ext.net/#/Form/TextField/InputMask/
  3. #3
    Daniil

    Does the 'DecimalPrecision' property work on NumericFields ?

                            <ext:NumberField runat="server" ID="txtNetMass" FieldLabel=" NetMass" FieldStyle="text-align:right;" Width="300" DecimalSeparator="." DecimalPrecision="3" HideTrigger="True">
    I got this code above and see no validation Error while entering some thing like '1.1234' ?

    Peter
  4. #4
    Yes, it looks .DecimalSeparator is not taken into account on validation. Though, it works in a different way. If a NumberField blurs, then its decimal part is truncated according to the DecimalSeparator setting.

    You can try to implement your own validation using a NumberField's Vtype or Validator.

Similar Threads

  1. Replies: 1
    Last Post: Feb 16, 2012, 3:27 PM
  2. Replies: 7
    Last Post: Dec 12, 2011, 9:08 AM
  3. Client Side Validation and Validation Status
    By speddi in forum 1.x Help
    Replies: 8
    Last Post: Nov 03, 2011, 11:24 AM
  4. Replies: 3
    Last Post: Jul 11, 2011, 9:43 AM
  5. [CLOSED] NumberField validation problem
    By majestic in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 21, 2010, 1:16 PM

Posting Permissions