add validation for ip field.
Merge pull request #1 from suzuken/assert_raise

add validation for ip field.