in reply to Yes No Validation

Ask for them in your regex.

if (/^((?:[Yy](?:es))|([Nn](?:o))$/) { .... }