Ayman wroteThat's their production code? That's one pile of shit, the one who wrote it obviously doesn't know that regex exists(and is largely useful for validation), never heard of javascript modules, and doesn't even know how to program.
I thought the exact same thing when I read the code.
But, in the end, what can we do about it, they don't want to pay for good programmers.