Skip to content

Commit

Permalink
fix(iri): Fixes IRI validation by just checking for a scheme.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryasmi committed Jan 10, 2018
1 parent 2912596 commit 745f702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/regexValues/iri.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { checkRegex, Rule } from 'rulr';
import { createTypeWarning } from '../warnings/TypeWarning';

const regex = /^\w+:\/\/[^\/\#\?]*\/?[^\#\?]*\??[^\#]*\#?[^$]*$/i;
const regex = /^\w+:\/\//i;
const warningConstructor = createTypeWarning('Internationalized Resource Identifier (IRI)');

export default checkRegex(regex, warningConstructor) as Rule;

0 comments on commit 745f702

Please sign in to comment.