Skip to content

Commit

Permalink
Suisin/Update validation rules (#6145)
Browse files Browse the repository at this point in the history
* update letter symbol rules

* new rulels

* Update declarative-validation-rules.js
  • Loading branch information
suisin-deriv committed Aug 10, 2022
1 parent 280e927 commit 4f527cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const validAddress = value => !/[`~!$%^&*_=+[}{\]\\"?><|]+/.test(value);
export const validPostCode = value => value === '' || /^[A-Za-z0-9][A-Za-z0-9\s-]*$/.test(value);
export const validTaxID = value => /(?!^$|\s+)[A-Za-z0-9./\s-]$/.test(value);
export const validPhone = value => /^\+?([0-9-]+\s)*[0-9-]+$/.test(value);
export const validLetterSymbol = value => /^([a-zA-Z'-.]+\s)*[a-zA-Z'-.]+$/.test(value);
export const validLetterSymbol = value => /^[A-Za-z]+([a-zA-Z'-.]+\s)*[a-zA-Z'-.]+$/.test(value);
export const validLength = (value = '', options) =>
(options.min ? value.length >= options.min : true) && (options.max ? value.length <= options.max : true);
export const validPassword = value => /(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]+/.test(value);
Expand Down

1 comment on commit 4f527cb

@vercel
Copy link

@vercel vercel bot commented on 4f527cb Aug 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-app – ./

deriv-app-git-master.binary.sx
deriv-app.binary.sx
binary.sx
deriv-app.vercel.app

Please sign in to comment.