[865402] Fixed bug in custom validation

Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=865402