Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
function validate_age(value, props) {
var intAge = parseInt(value);
if (isNaN(intAge)) {
return {valid: false,};
}
if (intAge < 0 || intAge > 125) {
return {valid: false,};
}
return {
valid: true,
cleanedValue: intAge,
};
}
class AgeEditor extends TextEditor.component {
validate(value) {
return validate_age(value, this.props);
}
}
AgeEditor = {
className: 'age-editor',
component: AgeEditor,
validate: validate_age,
};
class CustomisedTable extends React.Component {
constructor(props) {
super(props);
this.state = {
...this.state,