Best Practices for Sanitizing and Validating Complex Metadata Fields