<commit_before><?php

namespace App\models;

use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    protected $table = 'users';
    //
    protected $fillable = ['name', 'email', 'password', 'address', 'role_id'];

    public function role() {
    	return $this->belongsToMany('App\models\Role');
    }
}<commit_msg>Validation rules applied<commit_after><?php

namespace App\models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Validator;

class User extends Model
{
    protected $table = 'users';
    //
    protected $fillable = ['name', 'email', 'password', 'address', 'role_id'];

    public static function validate($input) {
    	$rules = array(
            'name' => 'required|alpha|max:255',
            'email' => 'required|email|max:255|unique:users',
            'address' => 'required|max:255',
            'role_id' => 'required|numeric|max:11',
            'password' => '<PASSWORD>',
    		);

    	return Validator::make($input, $rules);
    }

    public function role() {
    	return $this->belongsToMany('App\models\Role');
    }
}
{'fraction_non_alphanumeric': 0.16255707762557078, 'fraction_numerical': 0.01004566210045662, 'mean_word_length': 3.248062015503876, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 11, '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': '1260689', 'n_tokens_mistral': 347, 'n_tokens_neox': 343, 'n_words': 71}