Avatar

Correct answer by
Level 10

Hi,

use a regular expression in a script or the exit event to look for a comma.

This sample will check if there are at least two characters for the last name which are followed by a comma followed by at least two characters for the first name.

if (!$.rawValue.match(/\D{2}?\s*,+\s\D{2}?/g)) {

          xfa.host.messageBox("No first name or last name or comma entered!");

}

View solution in original post