Documentation ¶
Index ¶
- Variables
- func ValidateAddStudent(data models.Student) (models.Student, error)
- func ValidateAnswerNumber(body []models.SubmitAnswerRequest) error
- func ValidateChangePassword(req models.ChangePasswordRequest) error
- func ValidateEmail(email string) error
- func ValidateExpectationRequest(body models.ExpectationRequest) error
- func ValidateFullname(fullname string) error
- func ValidateLoginRequest(body models.LoginRequest) error
- func ValidateLoginType(loginType string) error
- func ValidateNisn(nisn string) error
- func ValidatePassword(password string) error
- func ValidatePhoneNumber(phoneNumber string) error
- func ValidateQuestionnareSettings(data models.QuestionnareSetting) error
- func ValidateRegisterStudent(data models.StudentRegisterRequest) error
- func ValidateSettingItem(settingVal null.Int16) error
- func ValidateSubmitAnswer(body []models.SubmitAnswerRequest) error
- func ValidateUpdateAdminRequest(data models.UpdateAdminRequest) error
- func ValidateUpdateStudent(data models.Student) (models.Student, error)
- func ValidateUsername(username string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAnswerLen = errors.New("semua pertanyaan wajib diisi") ErrInvalidId = errors.New("id pertanyaan tidak valid") ErrInvalidAnswer = errors.New("terdapat jawaban yang tidak valid. periksa lagi jawaban anda") ErrDuplicateId = errors.New("terdapat pertanyaan yang dijawab lebih dari sekali") ErrIdNumbetNotMatch = errors.New("id dan nomor pertanyaan tidak cocok") )
View Source
var ( ErrAlternativeIdEmpty = errors.New("alternative_id wajib diisi") ErrAlternativeIdNotFound = errors.New("alternative_id tidak ditemukan") ErrSettingInvalid = errors.New("nilai setting invalid") ErrSettingEmpty = errors.New("nilai semua setting wajib diisi") )
View Source
var ( ErrFullnameEmpty = errors.New("nama lengkap wajib diisi") ErrEmailEmpty = errors.New("email wajib diisi") ErrEmailInvalid = errors.New("email tidak valid") ErrNisnEmpty = errors.New("nisn wajib diisi") ErrNisnInvalid = errors.New("nisn wajib berupa angka") ErrUsernameEmpty = errors.New("username wajib diisi") ErrUsernameLength = errors.New("username minimal terdiri dari 5 karakter") ErrUsernameWhitespace = errors.New("username tidak boleh terdapat spasi") ErrPasswordEmpty = errors.New("password wajib diisi") ErrPasswordWhitespace = errors.New("password tidak boleh terdapat spasi") ErrPhoneNumberLength = errors.New("nomor hp hanya boleh terdiri dari 10 sampai 14 digit angka") ErrPhoneNumberPrefix = errors.New("nomor hp diawali dengan 08") ErrPhoneNumberNotNumber = errors.New("nomor hp hanya boleh terdiri dari angka") )
Functions ¶
func ValidateAnswerNumber ¶
func ValidateAnswerNumber(body []models.SubmitAnswerRequest) error
func ValidateChangePassword ¶ added in v1.1.0
func ValidateChangePassword(req models.ChangePasswordRequest) error
func ValidateEmail ¶
func ValidateExpectationRequest ¶ added in v1.1.0
func ValidateExpectationRequest(body models.ExpectationRequest) error
func ValidateFullname ¶
func ValidateLoginRequest ¶
func ValidateLoginRequest(body models.LoginRequest) error
func ValidateLoginType ¶
func ValidateNisn ¶
func ValidatePassword ¶
func ValidatePhoneNumber ¶
func ValidateQuestionnareSettings ¶
func ValidateQuestionnareSettings(data models.QuestionnareSetting) error
func ValidateRegisterStudent ¶ added in v1.1.0
func ValidateRegisterStudent(data models.StudentRegisterRequest) error
func ValidateSettingItem ¶
func ValidateSettingItem(settingVal null.Int16) error
func ValidateSubmitAnswer ¶
func ValidateSubmitAnswer(body []models.SubmitAnswerRequest) error
func ValidateUpdateAdminRequest ¶
func ValidateUpdateAdminRequest(data models.UpdateAdminRequest) error
func ValidateUpdateStudent ¶
func ValidateUsername ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.