<commit_before>import FormBuilderPropTypes from '../../../src/FormBuilderPropTypes'
import React from 'react'
import styles from './styles/ValidationList.css'

class ValidationList extends React.Component {
  static propTypes = FormBuilderPropTypes.validation

  render() {
    const {messages} = this.props
    return (
      <ul className={styles.validationList}>
        {messages.map((msg, i) =>
          <li key={i} className={styles[msg.type]}>
            {msg.message}
          </li>
        )}
      </ul>
    )
  }
}

export default ValidationList<commit_msg>Guard agianst missing validation<commit_after>import FormBuilderPropTypes from '../../../src/FormBuilderPropTypes'
import React from 'react'
import styles from './styles/ValidationList.css'

class ValidationList extends React.Component {
  static propTypes = FormBuilderPropTypes.validation

  render() {
    const {messages} = this.props
    if (!messages) {
      return null
    }
    return (
      <ul className={styles.validationList}>
        {messages.map((msg, i) =>
          <li key={i} className={styles[msg.type]}>
            {msg.message}
          </li>
        )}
      </ul>
    )
  }
}

export default ValidationList
{'fraction_non_alphanumeric': 0.12686567164179105, 'fraction_numerical': 0.0, 'mean_word_length': 2.7253086419753085, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '6029130', 'n_tokens_mistral': 342, 'n_tokens_neox': 335, 'n_words': 80}