<commit_before>/*global require, module*/
/** @jsx React.DOM */
var React = require('react'),
    Validator = require('validator'),
    easyGid = require("easy-guid"),
    _ = require('lodash');

var TextField = React.createClass({
    formNormalClasses: "form-group form-group-label",
    formNormalClassesFocus: "form-group form-group-label control-focus",
    isPointRequired: false,
    getValue: function (){
        return React.findDOMNode(this.refs.textBox).value;
    },

    getInitialState: function () {
        "use strict";
        var intialClass =  this.formNormalClasses;

        if (this.props.value !== null || this.props.value === "") {
            
            intialClass =  this.formNormalClasses + " control-highlight";
        }

        return {
            formClassCollection: intialClass
        };
    },

    valueChange: function(event){        
        var value = this.getValue();

        if(this.props.isNumeric) {
           value = (value === "") ? 0 : value;
        }
        
        if(this.props.isNumeric){
            if(_.endsWith(value, '.')){<commit_msg>Default props. Oh Yea!<commit_after>/*global require, module*/
/** @jsx React.DOM */
var React = require('react'),
    Validator = require('validator'),
    easyGid = require("easy-guid"),
    _ = require('lodash');

var TextField = React.createClass({
    formNormalClasses: "form-group form-group-label",
    formNormalClassesFocus: "form-group form-group-label control-focus",
    isPointRequired: false,
    getValue: function (){
        return React.findDOMNode(this.refs.textBox).value;
    },

    getInitialState: function () {
        "use strict";
        var intialClass =  this.formNormalClasses;

        if (this.props.value !== null || this.props.value === "") {
            
            intialClass =  this.formNormalClasses + " control-highlight";
        }

        return {
            formClassCollection: intialClass
        };
    },

    getDefaultProps: function () {
        return { isNumeric: false };
    },

    valueChange: function(event){        
        var value = this.getValue();

        if(this.props.isNumeric) {
           value = (value === "") ? 0 : value;
        }
        
        if(this.props.isNumeric){
            if(_.endsWith(value, '.')){
{'fraction_non_alphanumeric': 0.1411764705882353, 'fraction_numerical': 0.0008714596949891067, 'mean_word_length': 2.2247191011235956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5817543', 'n_tokens_mistral': 672, 'n_tokens_neox': 648, 'n_words': 124}