added validation with security errors and warnings