Validation mechanism has been removed in Slice 4.0.
If you would like to use this mechanism with Slice 4.0, feel free to take classes responsible for that from Slice 3.2.0 source code: https://github.com/Cognifide/Slice/tree/3.2.0
More details on how to use validation you can find in Slice 3.2 documentation.