Hola, jacven.
A ver si con esto te funciona:
Código HTML:
<html>
<head>
<script>
function validar(txt) {
co=txt.split('@');
if(co.length>2 || co[1]!='yahoo.com') {
alert('Correo no valido');
return false;
}
}
</script>
</head>
<body>
<form action="mailto:[email protected]" onsubmit="return validar(this.correo.value)">
<input type="text" name="correo" />
<input type="submit" />
</form>
</body>
</html>
Saludos,