IsName(value) Last updated: 28. Feb 2023

API only function

Checks for first name and last name in string.

Parameters

Name Type Description
value object Value to validate.

Returns

Boolean, true if it validates as a name.

Example

Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
write(docly.isName("Richard Dawson")); // Both first and last name specified

write("\n"); // New line
write(docly.isName("Richard")); // Only one name specified

write("\n"); // New line
write(docly.isName("")); // No name specified

write("\n"); // New line
write(docly.isName(null)); // No name specified