introduced some simple form validation into spectrum viewer