frantovar
frantovar

Reputation: 561

Flutter secure form string validation

I'm wondering how do you guys secure user input strings in Flutter forms.

I'm using string_validator package to protect the email fields and for regular text fields I was using isAlphanumeric checker, but this don't allow the user to use latin alphabet...

It would be nice to hear about your solutions. Thanks in advance!

Upvotes: 0

Views: 229

Answers (1)

Bruno J.
Bruno J.

Reputation: 252

I use the inputFormatters and a WhitelistingTextInputFormatter class with RegExp checking.

        inputFormatters: [
          WhitelistingTextInputFormatter(RegExp("[a-zA-Z0-9 ]"))
        ];

Upvotes: 1

Related Questions