Steps to replicate the issue (include links if applicable):
Using the rest API make are request like
curl -X 'POST' \ 'https://www.wikidata.org/w/rest.php/wikibase/v0/entities/items/Q4115189/statements' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "statement": { "rank": "normal", "property": { "id": "P369" }, "value": { "type": "value", "content": "Itemasdfadsf:Q42" } }, "bot": false, "comment": "API Editing investigating how item ids are validated" }' {"id":"Q4115189$8D8522B2-7E68-49A8-B310-B15F0964EDA6","rank":"normal","qualifiers":[],"references":[],"property":{"id":"P369","data-type":"wikibase-item"},"value":{"type":"value","content":"Itemasdfadsf:Q42"}}
Or using the action api like:
http://carrotwiki.wbaas.localhost/w/api.php?action=wbeditentity&format=json&id=Q5&token=5189b89a71be3b3919b44d978c9e06de647f03db%2B%5C&data=%7B%0A%09%22type%22%3A%20%22item%22%2C%0A%09%22claims%22%3A%20%7B%0A%09%09%22P1%22%3A%20%5B%7B%0A%09%09%09%22mainsnak%22%3A%20%7B%0A%09%09%09%09%22snaktype%22%3A%20%22value%22%2C%0A%09%09%09%09%22property%22%3A%20%22P1%22%2C%0A%09%09%09%09%22hash%22%3A%20%22d95bd3fe3e52cdad57730bfbb6c998da0408543c%22%2C%0A%09%09%09%09%22datavalue%22%3A%20%7B%0A%09%09%09%09%09%22value%22%3A%20%7B%0A%09%09%09%09%09%09%22entity-type%22%3A%20%22item%22%2C%0A%09%09%09%09%09%09%22numeric-id%22%3A%202%2C%0A%09%09%09%09%09%09%22id%22%3A%20%22Itefmasdf%3AQ2%22%0A%09%09%09%09%09%7D%2C%0A%09%09%09%09%09%22type%22%3A%20%22wikibase-entityid%22%0A%09%09%09%09%7D%2C%0A%09%09%09%09%22datatype%22%3A%20%22wikibase-item%22%0A%09%09%09%7D%2C%0A%09%09%09%22type%22%3A%20%22statement%22%2C%0A%09%09%09%22rank%22%3A%20%22normal%22%0A%09%09%7D%5D%0A%09%7D%2C%0A%09%22sitelinks%22%3A%20%7B%7D%0A%7D
What happens?:
a statement is added and then appears in the UI as shown below:
What should have happened instead?:
The API should have errored
Software version (skip for WMF-hosted wikis like Wikipedia):
Live on Wikidata, also on Wikibase Cloud