Some practice made for rails validation