Difference between isCorrent and isValid
See original GitHub issueThe semantics of isCorrect
and isValid
in Address4
and Address6
are not obvious and should be part of the documentation.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
UsernameToken.IsCurrent Property (Microsoft.Web.Services3 ...
The IsCurrent and IsExpired properties both indicate whether a security token is valid. The difference, is that a security token with an IsCurrent...
Read more >Issues · beaugunderson/ip-address - GitHub
a library for parsing and manipulating IPv4 and IPv6 addresses in JavaScript - Issues ... Difference between isCorrent and isValid. #68 opened on...
Read more >Docs - Moment.js
Note: Moments are created at evaluation time, so moment().diff(moment()) may not ... isValid(); // true moment('It is 2012-05-25', 'YYYY-MM-DD', true).
Read more >Difference between date-fns' isValid and luxon's isValid
The invoked date string variable with new Date() in date-fns it returns false but in luxon it return true. I shared my code...
Read more >Class MultipleChoiceItem | Apps Script - Google Developers
createChoice(value, isCorrect), Choice, Creates a new choice. ... response, String, a valid answer for this multiple-choice item ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
isValid()
returnstrue
if the address is valid, meaning it parses successfully/does not contain errorsisCorrect()
should probably be renamed to avoid confusion;isPreferredForm()
probably better captures the meaning…an address like
ffff:000f::
is valid but not “correct” or the “preferred form” because it contains leading zeroes, in this example (the “preferred form” would beffff:f::
)more information on IPv6 preferred form here: https://tools.ietf.org/html/rfc5952#page-10
similarly for IPv4 an address like
192.168.000.001
is valid but not correct/preferred (192.168.0.1
would be the correct/preferred form)make more sense?
Thanks! Makes perfect sense!