Implement a method to validate if a given string of parentheses and brackets is properly nested and balanced.