Bug #3344
[HR-Employee]Personal Data tambahkan validasi pada saat upload foto dengan nama special character.
Description
sesuai redmine http://remote.minovais.com:3000/redmine/issues/2888
mohon untuk di buatkan validasi pada saat upload foto dengan nama special character.
aplikasi http://remote.minovais.com:61115/
database di remote.minovais.com, 1452
Pertalife Prod
Files
Updated by M Azid Wahyudi 6 days ago
- Status changed from New to QA Test
- Assignee changed from M Azid Wahyudi to Muhammad Bintar
dear masbin , udah bisa di test ya
package :
Xtype
maxFileSize = Ext.ComponentQuery.query('uploadfile[name=' + targetField_ + ']')[0].maxFileSize;
Ext.ComponentQuery.query('[name=FileMax]')[0].setValue(maxFileSize);
var form = Ext.ComponentQuery.query('form[name=FormFileUpload]')[0].getForm();
uploadfilename = form.monitor.items.items0.value
uploadfilenameSub = uploadfilename.substring(uploadfilename.lastIndexOf('\\') + 1);
fileName = uploadfilenameSub.split('.').shift();
var regex = /^[a-zA-Z0-9\s]*$/;
var invalidChars = fileName.split('').filter(char => !regex.test(char)).join('');
if (invalidChars.length > 0) {
var message = `File name contains special characters: ${invalidChars}.`;
Ext.Msg.alert('Invalid File Name', message);
return;
}
makasih
Updated by Muhammad Bintar 6 days ago
- File clipboard-202501151409-kohjd.png clipboard-202501151409-kohjd.png added
- Status changed from QA Test to Closed
- Assignee changed from Muhammad Bintar to M Azid Wahyudi
sudah di deploy ke client