Added form validation to pictures.rb file