mirror of
				https://github.com/mdbootstrap/mdb-ui-kit.git
				synced 2025-11-04 09:57:36 +03:00 
			
		
		
		
	Merge pull request #421 from joplaal/master
Empty check checkValidity null protection
This commit is contained in:
		
						commit
						925696bcb3
					
				| 
						 | 
					@ -111,7 +111,7 @@
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      .on("keyup change", ".form-control", function() {
 | 
					      .on("keyup change", ".form-control", function() {
 | 
				
			||||||
        var $this = $(this);
 | 
					        var $this = $(this);
 | 
				
			||||||
        if($this.val() === "" && $this[0].checkValidity()) {
 | 
					        if ($this.val() === "" && (typeof $this[0].checkValidity != "undefined" && $this[0].checkValidity())) {
 | 
				
			||||||
          $this.addClass("empty");
 | 
					          $this.addClass("empty");
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          $this.removeClass("empty");
 | 
					          $this.removeClass("empty");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user