IsEmail(value) Last updated: 28. Feb 2023

API only function

Validates if string is an email.

Parameters

Name Type Description
value object Value to validate

Returns

True if validates as email.

Example

Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
write(docly.isEmail("Not an email"));

write("\n"); // New line
write(docly.isEmail("test@mail.com"));

write("\n"); // New line
write(docly.isEmail("tes t@mail.com"));

write("\n"); // New line
write(docly.isEmail("@bug.com"));

write("\n"); // New line
write(docly.isEmail(""));

write("\n"); // New line
write(docly.isEmail(null));