<commit_before># AgeValidator

## Usage

Add to your Gemfile:

```ruby
gem 'age_validator'
```

Run:

```
bundle install
```

Then add the following to your model:

```ruby
validates :my_date_attribute, :age => true
```

## Optional parameters

The age validator also accepts a minimum parameter, and also a custom error message:

```ruby
validates :my_date_attribute, :age => {minimum: 14, message: "Your message"}
```

## Validation outside a model

If you need to validate an age outside a model, you can do like this:

```ruby
AgeValidator.valid?(Date.today - 18.years) # boolean
```

## Credit

Based on https://github.com/balexand/email_validator

## Copyright

Copyright (c) [2015] <NAME>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is<commit_msg>Fixed readme<commit_after># AgeValidator

## Usage

Add to your Gemfile:

```ruby
gem 'age_validator'
```

Run:

```
bundle install
```

Then add the following to your model:

```ruby
validates :my_date_attribute, :age => true
```

## Optional parameters

The age validator accepts a minimum parameter, and also a custom error message:

```ruby
validates :my_date_attribute, :age => {minimum: 14, message: "Your message"}
```

## Validation outside a model

If you need to validate an age outside a model, you can do like this:

```ruby
AgeValidator.valid?(Date.today - 18.years) # boolean
```

## Credit

Based on https://github.com/balexand/email_validator

## Copyright

Copyright (c) [2015] <NAME>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
{'fraction_non_alphanumeric': 0.09898242368177614, 'fraction_numerical': 0.0074005550416281225, 'mean_word_length': 4.958677685950414, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2783774', 'n_tokens_mistral': 658, 'n_tokens_neox': 603, 'n_words': 277}