Advertisement
Guest User

Untitled

a guest
Aug 31st, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. var fieldValue = document.getElementById("someInput").value;
  2. if( fieldValue.length > 0 ) {
  3.  
  4. if( someValidationFunction( fieldValue ) ) alert("Field is invalid");
  5. }
  6.  
  7. <form onSubmit="return customValidation()>
  8.  
  9. //code to test fields
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement