Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. $(document).ready(function(){
  2. $.emailval = function(id){
  3. //$($id).filter(function(){
  4. var emailVal = $(id).val();
  5. if($.trim(emailVal) !== ""){
  6. var emailReq = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
  7. if (!emailReq.test(emailVal)){
  8. //alert('Unesi dobar email');
  9. return 0;
  10. }else{
  11. return 1;
  12. }
  13. }else{
  14. //alert("Upisite email");
  15. return 0;
  16. }
  17. //});
  18. }
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement