-
Notifications
You must be signed in to change notification settings - Fork 8
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
Validate twin ID input in transfer TFT page #3501
Conversation
@@ -21,6 +21,7 @@ | |||
validators.isNotEmpty('Invalid Twin ID'), | |||
validators.isNumeric('Twin ID should be a number'), |
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.
do we need isNumeric after having isInt?
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.
good catch :) validator removed.
validators.min('Twin ID should be more than 0', 1), | ||
validators.isInt('Twin ID should be a valid integer.'), |
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.
please move isInt
above min
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.
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.
done
Description
Add validation on twin ID input as it should accept only integers.
Changes
Related Issues
Tested Scenarios
The twin ID input should accept integers only.
Checklist