How To Write Custom Validation In Rails