Linked Questions
89 questions linked to/from How do I check for an empty/undefined/null string in JavaScript?
0
votes
1
answer
154
views
Display DIV in if/else statement
I have a filter in place,
if the filtered results for criteria is >0, i get the results displayed. In the case where the criteria itself returns an empty list, well, i'll juts get an empty list ...
0
votes
1
answer
167
views
What is the acceptable concise way to check for null or undefined in Javascript?
If you need to check whether a value is set i.e. not undefined or null, what would be the most convenient way to do it that does not sacrifice readability?
Here are some of the options I have been ...
0
votes
4
answers
83
views
How to define a variable in JavaScript that is empty but gives true for a if condition
var a = '';
if (a) {
console.log("True Value");
} else {
console.log("False Value");
}
The above code logs "False Value" for obvious reasons, I want to set variable 'a' to a empty value ...
0
votes
1
answer
67
views
Vue2 v-show validate empty strings in a loop
How do I validate inside of a loop with v-show empty items with vuejs2. I was trying the following but without any results
<div v-for="user in $store.state.users.data">
<ul>
&...
0
votes
1
answer
67
views
How to prevent a JavaScript error message displaying when a user has yet to submit data in a form?
How does one prevent a validation error message displaying in a form when a user has yet to submit data? And, how to ensure that the error message only displays if the data has been validated as ...
0
votes
1
answer
45
views
Trap Error when checking parameter
Simple Question really. I have a JS function that accepts a passed parameter. On the chance that the passed value is NULL I want trap for it but my limited JS experience is causing me to not have ...
-5
votes
1
answer
64
views
JavaScript, how to validate if string?
I'm working on a form where my user enters a number between 0-100.
If my user puts in 101, it will return with an alert saying that the numbers are invalid. But how do I validate so he doesn't put in ...
0
votes
1
answer
52
views
Error when attempting to send automated emails from spreadsheet
I am attempting to send emails collected on a google form. I receive Error:
Failed to send email: no recipient
I am guessing this happens when the script comes to a blank cell that should have email ...
0
votes
2
answers
40
views
Cannot set the property of an object when passing parameters in the costructor
I need to set up two flags canPlayLive and isSubscribed to true or false accordingly to values of parameters sent when creating the object.
Basically when null undefined '' is passed I want the flag ...
0
votes
3
answers
49
views
Script not validating name field properly
I have been setting up files to demonstrate form validation to myself. However I've found that the script doesn't check wether or not the name field is valid or not, could someone please tell me where ...
0
votes
1
answer
44
views
Alerting user while submitting if mandatory inputs are not filled
I am a Python developer and I have been working on Vuejs app.
If have function that is equivalent of a() in python that takes iterables. and if all items in iterable are true than all([...]) returns ...
0
votes
0
answers
34
views
AppsScript failed to generate timestamp in some rows
I have this script running for a file that I share with 10 other colleagues.
Problem:
Occasionally the script failed to generate a timestamp in Col22 although Col17 is filled in manually.
What could ...
0
votes
0
answers
30
views
Why don't DOM my events work and style changes?
First of all, let me tell you my purpose. If the entry is blank, a divin will appear, but when something is typed the divin will be "display: none".
I want this to happen, but as shown in ...
user avatar
user15345025
0
votes
0
answers
29
views
form validation javascript functions
i wonder if any body can drop for me the difference between the following javascript functions because am confused of which one i can use.
THESE ARE THE SNIPPETS BELLOW:
function isEmpty(){}
and
...