I have multiple routes set on a single page, and I am looking to validate only one specific route using the following code:
beforeRouteEnter(to, from, next) {
if(firstString=='a'||firstString=='A'){
if(parseInt(substring1) > 219028 && parseInt(substring1) < 386817){
console.log("Valid")
}
else{
alert("Invalid Seat No...!!")
next({
path: '/'
});
this.$refs.seatno1.focus();
}
},
<router-link :to="'institute_details/' + seatno " class="btn btn-success" >
<span v-on:click.capture="validateData">LINK</span>
</router-link>
<router-link :to="'institute_details/' + agriculture" data-toggle="tooltip" title="agri" data-placement="right" class="btn btn-danger">Agri</router-link>
I specifically need to validate "'institute_details/' + seatno".