Add validator for Post prop id

master
Raymonzut 5 years ago
parent abcc91ca81
commit 5a9de29169
No known key found for this signature in database
GPG Key ID: 97CF2D8BE2C69FC7
  1. 4
      client/src/views/Post.vue

@ -14,6 +14,10 @@ export default {
id: { id: {
type: String, type: String,
name: "id", name: "id",
validator: val => {
const reg = /([0-9]|[a-f]){24}/
return reg.test(val)
},
} }
} }
} }

Loading…
Cancel
Save