This needs to be done in the controller, otherwise the value can't be trusted.