not empty validation JavaScript JS
Not empty or blank field validation is used to check whether anything is entered in a given field or not. It will check for null and zero-length strings. Example: <!DOCTYPE html> <html lang=”en”> <head> <script> function notEmptyCheck(name) { if (name.value.length == 0) { alert(“Name can not be empty.”); return false; } return true; } </script> … Read more