1

I have a job portal website that lets employers post their vacancies. My question is regarding some information required to generate the structured data for search engines and in specific for the

jobLocation.address.postalCode

What if the employer just entered random numbers or incorrect postal code? Without entering such value, the JobPosting would receive a warning and it seems that it's not being processed into a rich card at least effectively.

Is it okay to enter a value like "NA" when the employer leaves it blank? Or "Confidential" in case the employer wants to keep their data private? This is an issue when I rely on 3rd party to enter data.

unor
  • 92,415
  • 26
  • 211
  • 360
Mostafa
  • 111
  • 2
  • 12
  • [Question with SEO part on Webmasters SE](https://webmasters.stackexchange.com/q/115813/17633) – unor Jun 13 '18 at 17:48

2 Answers2

0

Never trust form data being is valid, even if it's from your own pages.

In your presentation layer (html/js/css), you can use some simple javascript to ensure the form is not submitted unless the data in the PostalCode text box matches a RegEx pattern. Once submitted, check it again.

If you want a better postal code regex checker, look at this other post.

What is the ultimate postal code and zip regex?

Phil Cazella
  • 854
  • 5
  • 11
  • Thanks, so I understand that entering values like "NA" when the field was left blank or "Confidential" if the employer wants to keep it private is not allowed. – Mostafa Jun 09 '18 at 20:19
0

If you don’t have data for a property, or the data you have is incorrect, omit the property.

Don’t provide values like "NA" or "Confidential" instead. It defeats the purpose of providing structured data. Consumers of your structured data would have to check all property values for various terms (in various languages) that could suggest that the value isn’t an actual value. Most won’t, and can’t, do this.

And yes, depending on which properties have to be omitted, this item might no longer qualify for a consumer’s feature (like Google’s rich results). If you can’t provide all properties that are required for a certain feature, you shouldn’t try to provide these properties with fake/placeholder content. They are required for a reason; if you don’t have the necessary data for it, you shouldn’t get the feature.

unor
  • 92,415
  • 26
  • 211
  • 360
  • Thanks, in case the user has entered such value "NA" or even wrong data such as random digits in place of the postal code, does that let google hit the website with a penalty? – Mostafa Jun 10 '18 at 18:17
  • @Mostafa: Such penalty questions are off-topic here (and they can’t be answered anyway, it depends on countless factors). -- But why wonder about what search engines might do (which could change any minute)? It would be better to prevent that such values get published :) – unor Jun 10 '18 at 18:32