Loading ...
Sorry, an error occurred while loading the content.

Problem with "validateAsFloat"?

Expand Messages
  • aterrade
    $subscription- AddInput(array( TYPE = text , NAME = e_percentatge , ID = e_percentatge , ValidateAsFloat = 1, ValidationErrorMessage = Must be a
    Message 1 of 2 , May 24, 2006
    • 0 Attachment
      $subscription->AddInput(array(
      "TYPE"=>"text",
      "NAME"=>"e_percentatge",
      "ID"=>"e_percentatge",
      "ValidateAsFloat"=>1,
      "ValidationErrorMessage"=>"Must be a float",
      "LABEL"=>"<u>P</u>ercentatge",
      "ACCESSKEY"=>"P"
      ));


      SOME TESTS:

      albert -> show error at validate (OK)

      2 -> all good (OK)
      2.2 -> all good (OK)

      2,12 -> show again the form with the same value (WRONG)
      2_ " (WRONG)
      2_hello " (WRONG)

      Maybe i´m making something wrong. Thanks for all.
    • Manuel Lemos
      Hello, ... These are not valid floating point numbers. Floating point numbers may have decimal points, not commas. -- Regards, Manuel Lemos Metastorage - Data
      Message 2 of 2 , May 24, 2006
      • 0 Attachment
        Hello,

        on 05/24/2006 07:02 AM aterrade said the following:
        > $subscription->AddInput(array(
        > "TYPE"=>"text",
        > "NAME"=>"e_percentatge",
        > "ID"=>"e_percentatge",
        > "ValidateAsFloat"=>1,
        > "ValidationErrorMessage"=>"Must be a float",
        > "LABEL"=>"<u>P</u>ercentatge",
        > "ACCESSKEY"=>"P"
        > ));
        >
        >
        > SOME TESTS:
        >
        > albert -> show error at validate (OK)
        >
        > 2 -> all good (OK)
        > 2.2 -> all good (OK)
        >
        > 2,12 -> show again the form with the same value (WRONG)
        > 2_ " (WRONG)
        > 2_hello " (WRONG)
        >
        > Maybe i´m making something wrong. Thanks for all.

        These are not valid floating point numbers. Floating point numbers may
        have decimal points, not commas.

        --

        Regards,
        Manuel Lemos

        Metastorage - Data object relational mapping layer generator
        http://www.metastorage.net/

        PHP Classes - Free ready to use OOP components written in PHP
        http://www.phpclasses.org/
      Your message has been successfully submitted and would be delivered to recipients shortly.