Check this repository for more detailed example and actual implementation code:

https://github.com/Inflectra/rapise-powerpack/tree/master/SoftAssert