form.field('<selector>', {
type: 'card-number',
name: 'cc-number',
placeholder: 'Card number',
validations: ['required', 'validCardNumber'],
showCardIcon: true,
addCardBrands: [{
type: 'visa',
pattern: /^411/, // now visa card will be valid only if starts from 411
},],
});
form.field('<selector>', {
type: "file", // required
name: "images", // required
validations: ["required"],
/**
* Optional. A Boolean which, if present, indicates that the user
* may choose more than one file. By default - false.
*/
multiple: true,
/**
* Optional. Serializer intended to convert each file from the FileList
* into base64 form and return an array of values.
*/
serializers: [{ name: "toBase64" }],
/**
* Optional. Array of one or more unique file type specifiers describing file types to allow.
* By default set to "image/*, .pdf".
* Corresponding validation error: "invalid file name"
*/
accept: ["image/*"],
/**
* Optional. A string indicated what source to use for capturing image data.
* Available options: "user", "environment"
*/
capture: "user",
/**
* Optional. A number defines maximum file size in Bytes.
* Corresponding validation error: "uploaded file is too large"
*/
maxFileSize: 100000,
/**
* Optional. A number indicates maximum allowed files number.
* Corresponding validation error: "maximum 2 files can be uploaded"
*/
maxFiles: 2,
css
});