Skip to content

Commit

Permalink
fix: fix the validation condition for char addr
Browse files Browse the repository at this point in the history
  • Loading branch information
KillingJacky committed Feb 26, 2021
1 parent 6cbf9e6 commit 93e6b29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sensecap_one_cfg_tool",
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"description": "SenseCAP One Configuration Tool",
"author": "Jack Shao <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ export default {
data() {
let rules = {
required: {required: true, message: this.$t("Required."), trigger: 'blur'},
charAddr: {type: 'string', required: true, pattern: /[0-9a-zA-Z]{1}/, message: this.$t("Invalid Address."), trigger: 'blur'},
charAddr: {type: 'string', required: true, pattern: /^[0-9a-zA-Z]{1}$/, message: this.$t("Invalid Address."), trigger: 'blur'},
mbAddr: {type: 'number', min: 1, max: 247, message: this.$t("Invalid Modbus Address."), trigger: 'blur'},
deviceName: {type: 'string', min: 1, max: 64, message: this.$t("Invalid Device Name."), trigger: 'blur'},
rng10_100: {type: 'number', min: 10, max: 100, message: this.$t("Invalid Number."), trigger: 'blur'},
Expand Down

0 comments on commit 93e6b29

Please sign in to comment.