PKCS#7 padding validation
Python, 47 34 33 bytes



lambda s:s[-1:]*s[-1]==s[-s[-1]:]


s[-1] is the last member of the list s. Checks that the last s[-1] members of the input array s are the same as an array of s[-1] repeated that many times.

Takes input as an array of integers. This is a lambda expression; to use it, assign it by prefixing lambda with f=.

Try it on Ideone!

To test:

&gt;&gt;&gt; f=lambda s:s[-1:]*s[-1]==s[-s[-1]:]
&gt;&gt;&gt; f([27, 33, 54, 65, 97, 33, 52, 55, 60, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10])
True
&gt;&gt;&gt; f([50, 39, 94, 105, 49, 29, 74, 102, 2, 106, 44, 7, 7, 7, 7, 7, 7])
False


Saved 13 bytes thanks to Leaky Nun!

Saved a byte thanks to Dennis!