Add validator for Post prop id
This commit is contained in:
@@ -14,6 +14,10 @@ export default {
|
||||
id: {
|
||||
type: String,
|
||||
name: "id",
|
||||
validator: val => {
|
||||
const reg = /([0-9]|[a-f]){24}/
|
||||
return reg.test(val)
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user