Added alerts for invalid text in viewController for demo purpose.