@kaushalmall can you provide a reference to where vtypes are only for client-side. Not saying I disagree with you, I'm just curious.

Regardless, I agree with @davidjgonzalez that this needs to be refactored into a JS file and then referenced like:

    change="function( f, v, o ){ return ACS.wcm.vanityCheck(f,v,o); };