Skip to Content
NFSFU234FormValidation v3 is here — file upload validation, config-driven rules, and more.
v3 (current)generatePassword

generatePassword

Generates a random password of the given length. Returns: Promise<any>

ParameterTypeRequiredDefaultDescription
lengthnumberoptional-The desired password length.
shouldHashbooleanoptional-Unused as of v3 (password hashing was removed); retained for signature compatibility.
Usage
Example: Generate Random Password
const randomPassword = nfsfu234FormValidation.generatePassword(); randomPassword.then(password => { console.log("Generated Password: ", password); // Example output: "A!3d7fhJ" });
Example: Custom Length
const randomPassword = nfsfu234FormValidation.generatePassword(16); randomPassword.then(password => { console.log("Generated Password: ", password); });
Last updated on