Person.js 870 Bytes
/* global console */
define(
    [
        'ofbiz/model/Base',
        'ofbiz/model/Party',
    ],
    function(
        Base,
        Party
    ) {
        'use strict';
        console.log('ofbiz/model/Person: loaded');
        return Party.extend({
            defaults: {
                firstName: null,
                lastName: null,
            },
            validation: {
                firstName: [
                    {
                        required: Base.createRequiredValidator('ofbiz/model/Person.firstName'),
                        maxLength: 100
                    }
                ],
                lastName: [
                    {
                        required: Base.createRequiredValidator('ofbiz/model/Person.lastName'),
                        maxLength: 100
                    }
                ],
            },
        });
    }
);