Why isvalid(“integer”,“1,5”) = YES?

前端 未结 4 2022
不知归路
不知归路 2020-12-17 18:02

Why does #isValid(\"integer\",\"1,5\")# output YES? I expected it to output NO like #isValid(\"integer\",\"1.5\")# does.

I\'m going to vali

4条回答
  •  时光取名叫无心
    2020-12-17 18:30

    Server side validation (only need the cfif logic, loop for example only)

    
         ...error code for not numeric
    ...error code for not integer
    is integer

    Tighter direct code:

     ...error code for not integer

    You could write a cffunction as well

提交回复
热议问题