adding js to validate content