Skip to content

Commit

Permalink
Merge branch 'haacked:main' into feat/custom_highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
xsustek authored Oct 2, 2024
2 parents 77a62e6 + 061c242 commit fdf052e
Show file tree
Hide file tree
Showing 48 changed files with 4,658 additions and 1,512 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode/
sample/
src/
.gitattributes
.travis.yml
Expand Down
12 changes: 10 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ let v = new ValidationService();
v.bootstrap();
```

> Use [instapack](https://github.com/ryanelian/instapack) for easy, rapid, and painless web application front-end development using TypeScript!
## Why?

**jquery-3.3.2.min.js** + **jquery.validate.min.js** + **jquery.validate.unobtrusive.min.js** = 112 KB
Expand Down Expand Up @@ -122,6 +120,16 @@ public class ClassicMovieAttribute : ValidationAttribute, IClientModelValidator
var year = _year.ToString(CultureInfo.InvariantCulture);
MergeAttribute(context.Attributes, "data-val-classicmovie-year", year);
}

private static bool MergeAttribute(IDictionary<string, string> attributes, string key, string value) {
if (attributes.ContainsKey(key)) {
return false;
}

attributes.Add(key, value);
return true;
}

}
```

Expand Down
Loading

0 comments on commit fdf052e

Please sign in to comment.