elasticsearch/elasticsearch — pull request #5782 by amarandon (2014-04-11 19:12:49+00:00)
Title: Fix detection of unsupported fields with validate API

The validate API was failing to reject JSON input that had unsupported fields placed after a supported field. This was causing invalid requests to be reported as valid.

First commit adds a test that triggers the issue. Second commit fixes it.

Ref. #5685