Giter Site home page Giter Site logo

craft-iban-field's Introduction

IBAN Field for Craft CMS

Icon

A field for storing, validating and formatting IBAN codes.

Background

"The International Bank Account Number (IBAN) is an internationally agreed system of identifying bank accounts across national borders to facilitate the communication and processing of cross border transactions with a reduced risk of transcription errors." (Wikipedia).

This plugin adds a field type to store and validate IBAN codes. It provides a Twig extension to format IBANs in different formats.

Requirements

  • Craft CMS >= 4.0.0

Installation

Open your terminal and go to your Craft project:

cd /path/to/project
composer require codemonauts/craft-iban-field
./craft install/plugin iban

Usage

After installation, the control panel can be used to create IBAN fields.

Twig Filter

You can use the |iban filter to format an IBAN code in different ways. The default is print:

{{ entry.myIban|iban }}
{# Output: "DE89 3704 0044 0532 0130 00" #}

{{ entry.myIban|iban('print') }}
{# Output: "DE89 3704 0044 0532 0130 00" #}

{{ entry.myIban|iban('electronic') }}
{# Output: "DE89370400440532013000" #}

{{ entry.myIban|iban('anonymized') }}
{# Output: "XXXXXXXXXXXXXXXXXX3000" #}

With โค by codemonauts

craft-iban-field's People

Contributors

kringkaste avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

seanpm2001

craft-iban-field's Issues

Installing the plugin gives me an ArgumentCountError

Just installing the plugin and refreshing any page of my website gives me this error:

ArgumentCountError
Too few arguments to function craft\web\View::registerTwigExtension(), 0 passed in .../vendor/codemonauts/craft-iban-field/src/Iban.php on line 22 and exactly 1 expected

Craft Pro 3.5.17.1
PHP version 7.4.2
OS version Darwin 19.6.0
Database driver & version MySQL 5.7.26

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.