conditionals if name already exists
This commit is contained in:
parent
5ebd70a8f0
commit
4cc3fc90c5
|
@ -0,0 +1,9 @@
|
|||
module.exports = Self => {
|
||||
Self.validatesPresenceOf('name', {
|
||||
message: 'Name cannot be blank'
|
||||
});
|
||||
|
||||
Self.validatesUniquenessOf('id', {
|
||||
message: 'This name already exist.'
|
||||
});
|
||||
};
|
|
@ -0,0 +1,9 @@
|
|||
module.exports = Self => {
|
||||
Self.validatesPresenceOf('name', {
|
||||
message: 'Name cannot be blank'
|
||||
});
|
||||
|
||||
Self.validatesUniquenessOf('id', {
|
||||
message: 'This name already exist.'
|
||||
});
|
||||
};
|
|
@ -9,7 +9,6 @@
|
|||
<vn-autocomplete
|
||||
label="Genus"
|
||||
ng-model="$ctrl.botanical.genusFk"
|
||||
initial-data="$ctrl.getBotanicalData"
|
||||
url="Genera"
|
||||
show-field="name"
|
||||
value-field="id">
|
||||
|
|
Loading…
Reference in New Issue