<commit_before><div id="<?=$_id?>" class="well">
    <h2>Register</h2>
    <form action="<?=$registerUrl?>" method="post">
        <label>Email</label>
        <input name="email" type="text" value="<?=empty($email) ? '' : $email?>" 
               placeholder="Email" /><br />
        <label>Password</label>
        <input name="password" type="password" placeholder="Password" /><br />
        <label>Confirm Password</label>
        <input name="password_confirm" type="password" 
               placeholder="Confirm password" /><br />
        <input type="hidden" name="register" value="1" />
        <button>Register</button>

        <!-- add captcha -->
        <?=app()->createCaptcha()?>
    </form>
    <h2>PHP</h2>
    <h3>Create validator</h3>
    <pre>
$validator = app()->createValidator();
    </pre>
    <h3>Create rule to validate email address format</h3>
    <pre>
$rule = $validator->createRule('email')
    ->setErrorMessage('Invalid email address')
    ->setAction('isEmail');
$validator->addRule($rule);
    </pre>
    <h3>Add more rules and finally get validation result</h3>
    <pre>
    $result = $validator->validate()->getResult();
    </pre>
</div>
<commit_msg>Add css class to register form button<commit_after><div id="<?=$_id?>" class="well">
    <h2>Register</h2>
    <form action="<?=$registerUrl?>" method="post">
        <label>Email</label>
        <input name="email" type="text" value="<?=empty($email) ? '' : $email?>" 
               placeholder="Email" /><br />
        <label>Password</label>
        <input name="password" type="password" placeholder="Password" /><br />
        <label>Confirm Password</label>
        <input name="password_confirm" type="password" 
               placeholder="Confirm password" /><br />
        <input type="hidden" name="register" value="1" />
        <button class="btn">Register</button>

        <!-- add captcha -->
        <?=app()->createCaptcha()?>
    </form>
    <h2>PHP</h2>
    <h3>Create validator</h3>
    <pre>
$validator = app()->createValidator();
    </pre>
    <h3>Create rule to validate email address format</h3>
    <pre>
$rule = $validator->createRule('email')
    ->setErrorMessage('Invalid email address')
    ->setAction('isEmail');
$validator->addRule($rule);
    </pre>
    <h3>Add more rules and finally get validation result</h3>
    <pre>
    $result = $validator->validate()->getResult();
    </pre>
</div>

{'fraction_non_alphanumeric': 0.19793388429752065, 'fraction_numerical': 0.00909090909090909, 'mean_word_length': 3.035, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 99, 'https://': 0, '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': '6975471', 'n_tokens_mistral': 740, 'n_tokens_neox': 739, 'n_words': 155}