Fixes #6944/bz1106434 - Fixed Repodiscovery product validation

Added code in the repo discovery page to validate new product.
Previously product errors like blank name invalid label etc would not
show up on the screen. This commit tries to address that.
We tend to prefer using a variable to track the state and having a single return statement at the end.