add validate link method to post model