Chapter4 Example5: fixed redirect validation