Skip to content

Commit

Permalink
Merge pull request #14 from entria/fix/Strings.isAlpha
Browse files Browse the repository at this point in the history
Fix Strings.isAlpha
  • Loading branch information
felippepuhle authored Sep 28, 2017
2 parents 97f39ed + 23f18b4 commit f7b1f09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/Strings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
export const isEmpty = (value: string): boolean => value === undefined || value === null || value === '';

export const isAlpha = (value: string): boolean => /[a-zA-ZÁÉÍÓÚáéíóú]+$/.test(value);
export const isAlpha = (value: string): boolean => /^[a-zA-ZÁÉÍÓÚáéíóúÃÕãõçÇ ]+$/.test(value);

export const isEmail = (value: string): boolean => /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value);

Expand Down

0 comments on commit f7b1f09

Please sign in to comment.