Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

score validation added for hyperlink and info issues/540 is fixed #561

Merged
merged 2 commits into from
Nov 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<input v-model="selected.value" type="text" :placeholder="selected.type === 'DISCORD_JOIN' ? 'Enter server invite link' : '' " id="value" class="form-control w-100" >
</div>
</div>
<div class="row g-3 align-items-center w-100 mt-4">
<div class="row g-3 align-items-center w-100 mt-4" v-if="!noScore">
<div class=" text-left col-lg-3 col-md-3 text-left">
<label for="title" class="col-form-label">Score<span style="color: red">*</span>: </label>
</div>
Expand Down Expand Up @@ -206,6 +206,11 @@ export default {
return true
}
},
noScore(){
if(this.eventActionType === 'CUSTOM' && this.selected.type ==='INFO_TEXT'){
return true
}
}
},
data(){
return{
Expand Down Expand Up @@ -302,6 +307,13 @@ export default {
isvalid=false
this.notifyErr(`Please Enter Valid Url`)
}
else if(isNaN(parseInt(this.selected.score))){
isvalid=false
this.notifyErr(`Score should be a number`)
}else if(parseInt(this.selected.score)<0){
isvalid=false
this.notifyErr(`Score should be a Positive number`)
}
}else if(isNaN(parseInt(this.selected.score))){
isvalid=false
this.notifyErr(`Score should be a number`)
Expand Down