Add validation to net attribute