-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limits number of digits to 12 in number block #3551
Limits number of digits to 12 in number block #3551
Conversation
@walterbender please review! |
js/block.js
Outdated
|
||
if(String(this.value).length > 12) { | ||
const thisBlock = this.blocks.blockList.indexOf(this); | ||
this.activity.errorMsg(_("There can be atmost 12 digits"), thisBlock); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"at most"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please put a period at the end of the sentence.
Maybe "Numbers can have at most 12 digits."
@walterbender pls review |
Even though this issue has already been closed, I noticed that with 12 digits inside the block, overflow still occurs. Is this a concern? Wouldn't it be better to limit it to a smaller quantity within the block? |
Maybe ten is better than twelve |
It displays this error, and the block value defaults back to the previous value