Skip to content
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

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/playground/src/dashboard/transfer_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
:rules="[
validators.required('Recipient Twin ID is required'),
validators.isNotEmpty('Invalid Twin ID'),
validators.isNumeric('Twin ID should be a number'),
validators.min('Twin ID should be more than 0', 1),
validators.isInt('Twin ID should be a valid integer.'),
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree this will prevent this case
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

validators.min('Twin ID should be greater than zero', 1),
isSameTwinID,
]"
:async-rules="[isValidTwinID]"
Expand Down
Loading