Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
525 views
in Technique[技术] by (71.8m points)

validation - Why isvalid("integer","1,5") = YES?

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

I'm going to validate with <CFIF isvalid("integer","1,5") AND isnumeric("1,5")> ...

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Adobe is aware of this, but...

State: Closed

Status: Withdrawn

Reason: AsDesigned

https://bugbase.adobe.com/index.cfm?event=bug&id=3169196

TBH I'm a little embarrassed to be using a language that can't even validate integer correctly.

UPDATE:

Guess what, it'll be addressed in CF12!

There is no doubt that this behavior is incorrect. It is obviously wrong and it should be corrected. However, it has been like this forever and making such a fundamental change has a great potential to break a lot of applications. We dont want to do that in this release. As Rakshith has already communicated, we plan to take up such changes in 'Dazzle' where we will correct the behavior without worrying about backward compatibility.

http://blog.adamcameron.me/2014/02/can-we-please-agree-that-adobe-is-not.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...