Modern simple javascript validation