What is the purpose of the 'require' function in Solidity?