add recursion feature for validating nested attributes
add tests for nested attributes