0👍
this.patientRequestForCreationDtos
is array. maybe you can do this.
checkValidation(patientRequestForCreationDto) {
if (!patientRequestForCreationDto.drugName) {
Swal.fire("drug name is required...");
return;
}
return true;
},
0👍
if you’ll have only one element in patientRequestForCreationDtos
then you gotta choose first element in the array and then check its property
checkValidation() {
if (!this.patientRequestForCreationDtos[0].drugName) {
Swal.fire("drug name is required...");
return;
}
return true
},
also if your patientRequestForCreationDtos
is always gonna be an array then you might find this helpful
- [Vuejs]-How can I customize Vant.js?
- [Vuejs]-Flex-Wrap: Equal (Max-)Width for elements wrapped by column
Source:stackexchange.com