Integer(Decimal) type Validation Error

Hello there,

i have text field storing the Decimal Value, date type is int(decimal).

I wrote the validation where the dollar amount cannot exceed 100 Billion Dollars.

First, I have added $99,999,999,999.00 to the field, then no validation message thrown --> Valid.

second, i have added $9,999,999,999,999.00 without refreshing the page, then validation Message thrown ---> valid.

third, i have modified it to $99,999,999,999.00 without refreshing, then validation still exists which should be gone.

I do not understand where the issue is. Please guide if i am missing anything?

 a!textField(
            label: cons!MSP_LBL_DOLLAR_AMOUNT,
            value: rule!ACO_dollar(
              ri!request.dollarAmount,
              true
            ),
            saveInto: {
              local!dollarAmount,
              a!save(
                ri!request.dollarAmount,
                todecimal(
                  save!value
                )
              )
            },
            showWhen: rule!MSP_dollarAmountFieldVisibility(
              ri!request
            ),
            required: true,
            validations: if(
              and(
               not( rule!ACO_isBlank(ri!request.dollarAmount)),
              ri!request.requestTypeId = cons!MSP_ID_REQUEST_DATA_TYPE_CONDUCT_WIRE_DISBURSEMENTS),
              if(
                len(
                  local!dollarAmount
                ) > 12,
                if(
                  like(
                    local!dollarAmount,
                    "100000000000.00"
                  ),
                  null,
                  "Dollar amount must be within 100 Billon Dollars.",
                  
                ),
                null
              ),
              null
            )
          ),

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data