https://github.com/bitcoin/bitcoin/blob/5180a86c96bc05d2a731f70f36aae28ab5a3fad4/src/qt/sendcoinsdialog.cpp#L339

I think this is %1, not %2
{
    if(!model || !model->getOptionsModel())
        return;
    QList<SendCoinsRecipient> recipients;
    bool valid = true;
    for(int i = 0; i < ui->entries->count(); ++i)
    {
        SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
        if(entry)
        {
            if(entry->validate())
            {
                recipients.append(entry->getValue());
            }
            else
            {
                valid = false;
            }
        }
    }
    if(!valid || recipients.isEmpty())
    {
        return;
    }
    fNewRecipientAllowed = false;
    WalletModel::UnlockContext ctx(model->requestUnlock());