Skip to content

Commit

Permalink
1.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
cgustav committed Jun 25, 2020
1 parent ab8a9e6 commit 215225d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
* Three use case implementation examples in README.
* Core functionalities and documentation.
* A complete implementation example.

## [1.1.0] - Mayor fix (jun 2020).

* Bugs related to special characters (-[0Kk]) fixed.
* Improved complete implementation example.
* Added `deFormatWithHyphen` method.
* Added testing module.
2 changes: 1 addition & 1 deletion example/complete_example.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:ui';

import 'package:dart_rut_validator/dart_rut_validator.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -114,6 +113,7 @@ class _MyHomePageState extends State<MyHomePage> {
RUTValidator(validationErrorText: 'RUT no válido').validator,
inputFormatters: [
LengthLimitingTextInputFormatter(12),

///Permitir solo numeros y la letra K en el textFormField
WhitelistingTextInputFormatter(RegExp(r'[0-9kK]')),
],
Expand Down
5 changes: 2 additions & 3 deletions lib/dart_rut_validator.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
library dart_rut_validator;

// import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';

Expand Down Expand Up @@ -106,13 +105,13 @@ class RUTValidator {
static String deFormat(String value) {
return value.split('.').join('').split('-').join('');
}

///Quita el formato específico de RUT
///de un text y lo deja con el guión.
///```
///print(RUTValidator.deformat('12.933.245-2'));//12933245-2
///```
static String deFormatWithHyphen(String value) {
static String deFormatWithHyphen(String value) {
return value.split('.').join('');
}
}
Expand Down
2 changes: 0 additions & 2 deletions test/dart_rut_validator_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:dart_rut_validator/dart_rut_validator.dart';

import 'determiner.dart';

void main() {
Expand Down
1 change: 0 additions & 1 deletion test/determiner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class Determiner {
String result = RUTValidator(validationErrorText: 'BAD').validator(rut);
if (result != null) failedMessages.add(result);
});

return failedMessages;
}

Expand Down

0 comments on commit 215225d

Please sign in to comment.