If it is on a deck, it may depend on the height your deck is off the ground. In the city I live, any deck that is more than 36 inches off the ground can not have vinyl railing. Sure the posts are wood and will have vinyl slips that go over them, but if the actual rails are vinyl, they may not pass code for strength if someone was to trip and fall against them (vinyl not as strong as aluminum or wood).
You may want to check your local building codes. Good luck!