Validation code not accepted

Hi all

not sure if anyone experience the problem I am having with the Lab about Attribute pattern.

I have done the lab and got the validation code. However when I copied and pasted into the Lab to submit, the code got rejected twice and now I have only one submit left.

The validation cod eis correct as I did not get any error message.

Any idea why?

3 Likes

Pay attention at your command string.
Must be validate_m320 pattern_attribute --file
If you fail the parameter and the json is valid you obtain the code always but it is wrong.
I have done this mistake and i “fired” 1 try!

1 Like

would you do the following to help us fix this issue?

  1. tell to us the command that reported an invalid code
  2. provide the associated answer file that was submitted to the validator?

Thanks,
Daniel.

My mistake was the following.
I used the same parameter of the example validation (yellow fields).
As you can see due to the json is well formed the validator answers OK but the code is the same of the previous run and it is incorrect (red fields).

Regards
GFranco

This is because the “example” uses the same documents as the attribute pattern.
We will make them slightly distinct to avoid this issue.

Daniel.

I ran into the same issue as well

1 Like

I had same issue friend. Thank you for posting your question. Syntax for validation program was a bit confusing so you brought a little light to dark Mongo world!

Thank you this worked for me!

I copied the command as was given in the Lab exercise for Attribute pattern. The validation code on all 3 tries failed for me. The JSON schema, on looking at the correct answer, is exactly the same as what I had answered. The validation code for my answer and the valid answer, comes to be the same. So why was my answer marked as Incorrect? I am facing the same issue with Subset pattern. The validation code has failed twice. I am unable to figure out where I err?

validate_m320 pattern_attribute --file pattern_attribute.json --verbose
validate_m320 pattern_subset --file pattern_subset.json --verbose

I have the same problem as sarika0607, the validation code fails in Attribute Pattern Lab.
I am running copied and pasted command: “validate_m320 pattern_attribute --file pattern_attribute.json” and the result ends with 6f19, it is different then example code.

Piotr,

The validation code produced by the validator is right, however, it was not accepted by the server.
You have been credited for your work.

Thanks for reporting the issue.
Daniel.

I’m having the same issue as users reporting above. the JSON validator claims the answer is correct, but it is not accepted by the server. That’s annoying

Please share the code in the Messages. :slight_smile:

Kanika

Would you verify that you have the latest version of the validator?
Please run the following command:

validate_m320 --version

You should see the following output:

validate_m320 version 02.00

Hi I am also facing the similar issue. I am able to generate the code but it fails when I paste it.

image

Also, when I ran the validator on the json I got in problem statement, I got below error:

One more weird issue I am facing is:

image

Regarding the last image, it looks like the current directory is not in the path for the shell.
Run the following command to see the version:

./validate_m320 --version

As for the problem with the validation code, you need to give the lab name as the first argument, not “example”. Run:

./validate_m320 pattern_attribute --file pattern_attribute.json

Regards,
Daniel