<![CDATA[ Quip email validation - My Forums]]> https://forums.modx.com/thread/?thread=70903 <![CDATA[Quip email validation]]> https://forums.modx.com/thread/70903/quip-email-validation#dis-post-396324
i'm looking for a good solution (!= hacking the quip core) to validate email adresses. Actually I can enter whatever I want in die email field - it only validates empty or not. I think it should be possible to check an email adress at least for a dot and a @.

Is there actually a way to do this without hacking the quip core?

thanks in advance!
Chris]]>
chrizz Oct 09, 2011, 09:37 AM https://forums.modx.com/thread/70903/quip-email-validation#dis-post-396324
<![CDATA[Re: Quip email validation]]> https://forums.modx.com/thread/70903/quip-email-validation#dis-post-466756
<script type="text/javascript">
var IsEmail=function () {
	var email=$('#quip-comment-email-qcom').val();
	var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (regex.test(email)==false) {
		$('button[name="quip-post"]').attr("disabled","yes");
	} else {
		$('button[name="quip-post"]').removeAttr("disabled");
	}
}
$('#quip-comment-email-qcom').bind('keydown keypress', function () { setTimeout(function() { IsEmail(); }); });
</script>

Remember to include jQuery.]]>
batyrex May 20, 2013, 09:40 AM https://forums.modx.com/thread/70903/quip-email-validation#dis-post-466756