Update base.js

Replace parents jquery method with closest for add error class