noteText.trim().length > 3
# codingconventions
e
noteText.trim().length > 3
👍 1
t
That probably captures the spirit of what
isValid
does, but strictly speaking it fails on inputs with leading or trailing whitespace whose length is 4 or less. The string
" ab "
for example.
v
@todd.ginsberg Sorry, not sure I understand you correctly, you wan't " ab " to be a valid option?
t
I don't want anything, I just pointed out that the proposed solution isn't precisely the same as the code being replaced.