Thanks to the 2005 Stolen Valor Act, it has become a federal offense to wear military medals or a military uniform as a fashion statement (or even to make false claim to the right to wear them). For the civilian, it might be difficult to spot an imposter in a military uniform, but there are things you can look for and even databases you can use to verify someone's military service.
Verify that the branch insignias worn all match. For example, if someone is wearing a Navy insignia on the left sleeve and has an Army patch above their left pocket, this would be a fake uniform.
Look at the placement of the medals and ribbons. Military.com has placement guides for all the branches.
See where the name patch and qualification patches are. The name patch should be on the right side. The qualification patches (courses the person has passed, such as Airborne, Diver, etc.) are above or on the left pocket.
Check for current uniforms. The Marines and Army recently digitized their camouflage patterns. The Army collars are now Mandarin.
Verify medals. Take note of which medals the person is wearing, or simply ask what each one means. Then check their names against a database, such as the Home of Heroes database. If the person is wearing a fake medal, Home of Heroes will report the perpetrator to the FBI for you.
Check for slovenliness. Proper military uniforms are cleaned and pressed. Patches are sewn on with invisible stitches and are evenly spaced. Shoes should be very shiny. Hats or berets should be on straight. No military member is allowed to be out in public in messy uniforms (unless they're at war). This is generally only enforced by the Special Operations branches (which includes U.S. Army Rangers, Special Forces, Navy SEALS, and more within each branch). If someone is wearing unpolished shoes, a crooked brown beret and a wrinkled uniform and claims to be an Army Ranger, he is probably not telling the truth.
Check the dates for the medals. If someone is sporting a Korean War medal but is clearly a young man, there is reason to doubt the validity of the medal.
Ask questions and expect answers. If someone claims he cannot tell you which unit he's in because it's "secret," know that he is really not in a secret unit. High security unit members are not allowed to say they're in a "secret" unit and will just make up a unit name.
If you can't remember all the ribbons and medals someone is wearing, take a picture with your cell phone, and use it to verify their claims later. If someone tries to pass as a military member, don't be afraid to report the incident to your local FBI office.
It is also a federal offense to pose as a military member in a setting such as an Internet chat room as well as in person. For instance, a man posing as a military member to impress a female could be prosecuted.