Added code example for Validation and Generation